I have a group of computers that I want to power off and then power back on, is there a Powershell command that will do this? I have the 'shutdown' command to turn them off, I can't use the reboot command.
Thanks in advance!
If you use powershell 5.0 + , you can use the Restart-Computer cmdlet.
$computers = @('name1','name2')
foreach ($computer in $computers)
{
Restart-Computer -ComputerName $computer -Force
}
Another alternative is using the shutdown with CMD.
shutdown -i