I have a script with a foreach cycle. It has about a dozen functions, each collecting information from remote machines' C$ share (cutting text files, checking file version, etc.)
This is however taking some time, since each machine's data collected after one by one. (sometimes it runs with 500+ input)
Wish to put this into runspaces with parallel execution, but so far no examples worked. I am quite new to the concept.
Current script's outline $inputfile = c:\temp\computerlist.txt
function 1 function 2 function 3, etc
foreach cycle function 1 function 2 function 3
All results written to screen with write-host for now.