thinknero.blogg.se

Powershell reboot windows
Powershell reboot windows




powershell reboot windows

You can add servers to the array or text file and then pass a single value through foreach loop and the steps for the post-reboot checklist and move on to To overcome this solution, you need to pass each server one at a time, write a few steps for server post-reboot checklist, and then move on to the next server. If you are giving both the servers in the same command line thenīoth servers will reboot at the same time and this is what we don't need it. OR (Get-Content C:\Servers.txt) | Restart-Computer -Verboseįew servers have dependencies on the other servers so main servers need to restart first. For example, "Test1-Win2k12","Test2-Win2k12" | Restart-Computer -Verbose You can also use the Pipeline to restart remote computers. Restart signal will be sent to both the computers at a time in the above example. The above command will restart computer Test1-Win2k12 automatically and if you have multiple remote computers to restart then you can provide multiple computers separated with comma (,).For example, Restart-Computer -ComputerName Test1-Win2k12, Test2-Win2k12

powershell reboot windows

For example, Restart-Computer -ComputerName Test1-Win2k12

powershell reboot windows

To restart the remote computer, you need to use the Restart-Computer command provided by the computer name.






Powershell reboot windows