Restart Multiple Windows Server Machines Using PowerShell

In this blog post, I will show you how to restart multiple Windows Server machines using PowerShell.

In my case, I had to restart around 50 Windows Server machines and I wanted to do it at the same time.

The quickest way for me to do it was using a PowerShell script \ code and it took me a few minutes to put the cmdlet and the list of computers together.

The cmdlet takes a list of computers from a CSV file and restarts the machines.



Script \ Code

Once the file is ready and loaded, I will run the cmdlet below and the machines will restart.

Import-Csv .\pcs.csv | ForEach-Object{Restart-Computer -ComputerName $_.pc -force -Verbose }