Hereunder a nice tick with “Restart-Computer” with PowerShell version 3 :
Restart-Computer -ComputerName 2K12R2RODC -Wait -For WinRM
You’ll see some intermediate state like this one :
And finally, you have the prompt back :
This is king of nice, you won’t need the infamous “ping 2K12R2RODC -t” anymore !
And once the prompt is back, you’re sure that the computer has WinRM started.
You can specify other service name as well :