

Keep in mind that there are limits to everything so keep your machine’s resource consumption in mind as you test this concept out. This also means that you can submit multiple jobs in the background and continue processing without waiting for each job to complete. PowerShell Cmdlets sometimes include the “ -AsJob” parameter that will allow the command to submitted in the background, releasing the console to be used for other commands. Alternatively, you can use the Start-Job CmdLet to run commands as Jobs.

I did some research on multi-threading with VBScript and kept getting results that referred to PowerShell “jobs”, which gave me the motivation to start learning PowerShell.įor those of you who come from a Unix or Linux background, jobs will be a familiar concept since you can background any command by placing an “ &” at the end of the command. The only bad part about this script was that it took days to run against the machines, processing each one sequentially in a For loop before moving on to the next. Each machine needed to have the exact same set of commands executed on it, a new file copied and service restarted, to fix them so I created a quick VBScript to connect to each machine and perform the fix actions. Then fate threw me a curve ball when I was presented with a task to fix over 9,000 workstations that had lost their “parent” antivirus server. I have to be honest, back in 2010 I was firmly entrenched in VBScript and had no interest in learning anything new. Stay tuned in the upcoming weeks for some amazing regular content.

Hello everyone! Doctor Scripto is elated to present some more great content from Joel Vickery, PFE, today he discusses using jobs in PowerShell.
