Powershell Parallel Processing

gisliScriptingLeave a Comment

Parallel processing is where you can iterate more commands at the same time. In powershell you basically run through step by step procedure where you do something, but if you run parallel processing you can run more than one steps at a time. For instance if you are enumerating through multiple servers like doing a WMI query from servers, you would in fact run one server at a time, but if you use parallel processing you can run WMI query on multiple servers at a time, this would increase the speed if you have a large environment. Here are some examples on how to create a parallel processing scenario. As you can see this demo creates files and writes some data into the file also writes down in what order the files finished first.

As you can see in the whofirst.txt file you can see that the first file to complete is the file4 and the next is 1, 2 and then finishes on the file 3.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.