davesnb
asked on
powershell and invoke-command
Hi Ee,
i have a script that invokes a script residing on remote host with ;
invoke-command -computername computer1 - command { c:\script\somescript.ps1}
invoke-command -computername computer2 - command { c:\script\somescript.ps1}
Pardon my syntax , it works gret however , is it waiting for the first script to completely finish/exit before it moves onto the second invoke-command , or are they running concurrently ?
if not running concurrently , is there a parameter to specify this ?
i have a script that invokes a script residing on remote host with ;
invoke-command -computername computer1 - command { c:\script\somescript.ps1}
invoke-command -computername computer2 - command { c:\script\somescript.ps1}
Pardon my syntax , it works gret however , is it waiting for the first script to completely finish/exit before it moves onto the second invoke-command , or are they running concurrently ?
if not running concurrently , is there a parameter to specify this ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Jason - How is it not accurate? You go on to describe the exact same thing as I did in my last paragraph.
ASKER
Thanks Guys
Open in new window
orOpen in new window
https://blogs.technet.microsoft.com/heyscriptingguy/2012/07/25/an-introduction-to-powershell-remoting-part-three-interactive-and-fan-out-remoting/If you wanted one command to run at a time, you could just use a ForEach-Object loop:
Open in new window