VMware Cloud Community
jvm2016
Hot Shot
Hot Shot
Jump to solution

running script on multiple windows servers from managment box_powershell

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
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

tx Luc.

Reply
0 Kudos