Hi All,
I'm trying to run a .exe file with parameters on multiple virtual machines in parallel fashion. But when I execute the below command on a remote machine, it waits until the job is complete.
Is there a better command so that I can execute the exe command on all the virtual machines parallelly.
Invoke-Command -ComputerName $IPAddress -Credential $credentials -ScriptBlock {& "C:\Users\Administrator\Desktop\scripts\sample.bat"}
The sample.bat file has the command with arguments.
Thanks
Viknesh
Is it possible to use "-RunAsync"?
If you have VMware Tools installed on these stations, you can use the Invoke-VMScript cmdlet with the RunAsync switch.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference