Skip to content

secnnet/Pretend-Busy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Pretend Busy

The script defines a PowerShell function called Pretend Busy that creates the illusion of being busy by running a series of PowerShell commands in multiple console windows.

The function takes an optional parameter called ConsoleCount which specifies the number of console windows to open. If the parameter is not specified, the default value is 1.

The code begins by creating an array variable called $Commands that contains a list of PowerShell commands to be executed. These commands include retrieving files and directories from the C:\ drive, displaying running processes, displaying Windows services, retrieving environment variables, and displaying registry keys and values.

Next, the script enters a loop that runs for the specified number of console windows. In each iteration of the loop, a random command is selected from the $Commands array and executed in a new PowerShell process. The script then waits for a random amount of time (between 1 and 10 seconds) and updates the progress bar to show how many console windows have been processed and which command is currently being run.

Finally, when all console windows have been processed, the script ends.

Overall, this script is a humorous example of how to use PowerShell to create the illusion of being productive without actually doing meaningful work. The Pretend-To-Be-Busy function can be called with a specified number of console windows to open and create the appearance of being very busy running a variety of commands. 😊