Loading

Sunday, November 29, 2009

How to remotely shutdown, restart or logoff a Windows Machine

With these simple commands you can remotely restart, shutdown, log off or even abort a system shutdown on  Local or remote windows machines using Remote Shutdown Tool (shutdown.exe).

The Remote Shutdown Tool can be accessed via a GUI or from the command prompt.

The Remote Shutdown Tool GUI can be accessed by executing:
shutdown.exe /i


Here are the command line options for shutdown.exe:

Usage examples
Restart a network machine and force any running applications to close
shutdown /m \\computername /r /f

Abort a previous shutdown command
shutdown /m \\computername /a
Shutdown a network machine and force any running applications to close
shutdown /m \\computername /s /f
Logoff a machine and force any running applications to close (This cannot be used with /m to specify the target machine)
shutdown computername /l /f
Hibernate a local machine and force any running applications to close
shutdown /m \\computername /h /f
Note: By default the time-out period in previous examples is set to 30 seconds.
Restart a network machine and force any running applications to close giving a reason and set the time-out period to 1 minute (120 sec).
shutdown /m \\computername /r /f /c “Computers will restart in 1 minute, please save any work. System Administrator” /t: 120
Schedule a restart of a machine:
at 23:00 /every:M,T,W,Th,F shutdown /r /m \\computername
Note: this will run on all versions of Windows (2000, 2003, 2008, XP, Vista, Windows 7).

No comments:

Post a Comment