PowerShell | Intro | Jobs and More..



Parallel vs Series

This is where you process one request at a time vs multiple. For example a foreach loop does one at a time where a job can run thousands at a time and can greatly reduce the amount of time a PowerShell script takes to execute. These are usually applicable when dealing with large quantities of computer systems. There are multiple cmdlets to assist in running things as Jobs / Runspaces etc…

Here is a example on this site using -AsJob and Receive-Job:

Local Group Membership

WinRM Test

Services IIS SQL





These are a bit advanced concepts so don't spend tons of time on these if you are just beginning.

Here is a site with some more info:

https://blogs.technet.microsoft.com/uktechnet/2016/06/20/parallel-processing-with-powershell/

https://4sysops.com/archives/powershell-background-job-basics/