Thursday, May 17, 2012

How to remote reboot windows server 2008

In short answer: shutdown -r -m \\machinename(IP) /t 5
 
This shutdown utility is available at the command line in Windows Server 2008 and earlier operating systems going right back to XP.  Start by typing cmd; remember to 'Run as Administrator'.  Once the DOS box launches your first real decision is do you want to reboot (-r), or shutdown (-s) that server in another part of the network?
Note 1: The default with -r is the local machine!  Thus introduce the -m switch if you want a remote restart.
Note 2: While your 'victim' is probably a Windows Server, you can launch the command from Windows 7 or earlier Microsoft clients.
Warning:  Despite what anyone tells you, nobody gets to be an expert with Shutdown without accidentally downing the local machine instead of the target computer.  To recover from this mistake pay close attention to the syntax of Shutdown's abort switch -a.
Select Your ComputerName With -m
When you attempt to restart a remote Windows server always remember that the default computername is the local machine, therefore to access a remote server you need to append  -m ComputerName. 
The full command would be:
Shutdown -r -m \\BigServer  If the minus sign is unfamiliar, you could try
Shutdown /s /m \\BigServer, in this example, 'BigServer' is the hostname of the remote operating system.  None of these commands is case sensitive so sHUTDOWN -R -m \\bigserver would work just as well.
Note 1:  There is no space between the double backslash and the computername
\\  BigServer would not work.
Note 2:  If you substitute -s for -r that would mean shutdown.
Tip: For testing -m on the local machine, try 127.0.0.1
For example, shutdown -r -m  \\127.0.0.1  Such a command is useful in batch files.  Alternatively, to reboot numerous computers try PowerShell's command Restart-Computer.

No comments: