Hi Luc ,
just thought of sumarizing the steps we need to perform to facilitate executing .ps1 script to multiple windows machines.
this is what i can recall please suggest if we need to add more to it .
1:winrm on remote servers is running
2:also one of the ports 5985 or 5986 is open
use following syntax
3:Invoke-Command -ComputerName Server01, Server02 -FilePath c:\Scripts\sample.ps1
Yes, that should work, provided the account has the required rights on the target station.
The full list of requirements for using Invoke-Command can be found in about_Remote_Requirements.
The alternative is of course to use Invoke-VMScript, which does require VMware Tools to be installed and running on the targets.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, that should work, provided the account has the required rights on the target station.
The full list of requirements for using Invoke-Command can be found in about_Remote_Requirements.
The alternative is of course to use Invoke-VMScript, which does require VMware Tools to be installed and running on the targets.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
tx Luc.