Link to home
Start Free TrialLog in
Avatar of sysnimda
sysnimda

asked on

How to use Powershell to restart several severs

Hello - I am looking for a way to restart several servers remotely as soon as updates are completed. Looking for a PSScript that would work in this scenario. I appreciate all your help.

Thank you so much!

sysnimda
Avatar of Hello There
Hello There

Use the shutdown command. Open the command prompt and type:
shutdown -i

Open in new window

Then specify all servers you want to reboot.
ASKER CERTIFIED SOLUTION
Avatar of FOX
FOX
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Use the restart-computer cmdlet. Just run this:

restart-computer -computername server1,server2,server3,etc

Open in new window

I suggest adding the -Verbose switch at the end of whatever you choose as that gives you a bit more info if something chokes.

Use this process carefully.