Reboot computer and wait

Hello,

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 :

[enum]::getvalues('Microsoft.PowerShell.Commands.WaitForServiceTypes')

0 thoughts on “Reboot computer and wait

  1. Hi Emmanuel,

    The pictures seems to be unavailable on this article.
    You should might fix it, and quickly! 😉

Leave a Reply