Windows 2003 Remote Shutdown Commands

Remote Shutdown Windows 2003

Shutdown is an exciting command line program available in the Windows Server family, and also Windows 7 and Vista.  I say exciting both in the sense that everyone loves this command, and also exiting in the sense it has a dramatic effect – downs the server.  So take care when experimenting with this command. 

Twenty dollars gets you fifty, that sooner or later you shoot yourself in the foot and accidentally shutdown your own machine instead of the machine you really wish to restart.  So pay close attention to the syntax.

Shutdown Command Windows 2003 Server Shutdown /a  Remember this is your get out of jail card, it aborts shutdown

Example: Shutdown  /a  /m \\computername

Windows 2003 Remote ‘Shutdown’ Commands

  ‡

Remote Shutdown – The Basics

Shutdown is a built-in executable in XP and the Windows Server family. Your first decision is do you want a simple shutdown?  If so, use Shutdown /s.  Alternatively, should you desire the machine to restart then type Shutdown /r.

After you issue the /s or /r, a dialog box appears with a 30 second count down, remember to issue the Shutdown /a if you are just testing, or have made a mistake.  Watch out for the dialog box disappearing as you issue the Shutdown /a instruction.

Shutdown /r Command – Select Your Victim

Now for the ‘Remote’ switch /r.  The full command would be:
Shutdown /r /m \\victim.  The slashes look slightly strange, but that’s how it works, in this example, ‘victim’ is the remote machine name.  None of this is case sensitive so sHUTDOWN /R /m \\ViCTim would work.

Note: There is no space between the backslashes and the computername
\\  victim would be a mistake.

  For the local machine, try 127.0.0.1 e.g shutdown /s /m \\127.0.0.1.  Useful in batch files.

Examples of Windows 2003 Remote Shutdown switch

shutdown /s /m \\victim – Shuts down a remote machine called ‘victim’

shutdown /r /m \\exchange – Reboots a remote machine called ‘Exchange’

Note: For once the sequence of switches is important shutdown /m /s \\ machine does not work.

Guy Recommends: SolarWinds Free Wake-On-LAN UtilitySolarwinds Wake-On-LAN

Encouraging computers to sleep when they’re not in use is a great idea – until you are away from your desk and need a file on that remote sleeping machine!

WOL also has business uses for example, rousing machines so that they can have update patches applied.  My real reason for recommending you download this free tool is because it’s so much fun sending those ‘Magic Packets’. Give WOL a try – it’s free.

Download your free copy of SolarWinds Wake-On-LAN

Remote Shutdown – Add the extras

/a abort or cancel.  See more about Abort Windows Shutdown

/t for time.  Is 30 seconds too short (or too long) a time?   You can adjust with /t: 60 to display the dialog box one minute. Maximum is 600 seconds.

/f for force.  ‘Mr Nasty’, is coming – ready or not!  Shutdown /r /f as you may have guessed, restarts the machine and closes any programs without warning.

/c for comment.  Would you like to put your stamp on the shutdown?  Let people know who is in charge!  /c " Guy is shutting you down for an update"

/d p:4:1 reason.  Personally, I would avoid this switch, the syntax is tricky the numbers obscure and worst of all it does nothing exciting.  That said the idea is sound, it enters a reason for the shutdown in the event log.  If you activate shutdown’s help, then you will get a whole list of major and minor reasons that you could employ with this switch.  For me, this switch is an option, an option that I do not take.

Note 1: Shutdown’s switches work equally well with a dash, for example, -d, -r or -a 
(instead of /d, /r or /a)

Note 2: Here is another example of remote restart of Windows Server

Note 3: See also VBS shutdown

GUI Remote Shutdown

Some poeple prefer the graphical interface of shutdown, to access this try:
Shutdown /i

Windows 2003 Remote Shutdown

How To Stop Users Shutting Down ComputersWindows 2003 Force Shutdown Group Policy

Every company has mischief makers.  If you want to stop people shutting down other workers machines by abusing shutdown -r, then you can set a Group Policy which prevents ‘Force Shutdown From A Remote Machine’.

Launch GPMC or SECPOL.MSC
Navigate to Local Policies
    User Rights Assignment.

Experiment by assigning just your account, rather than all administrators.

Guy Recommends: Permissions Analyzer – Free Active Directory ToolFree Permissions Analyzer for Active Directory

I like thePermissions Monitor because it enables me to see quickly WHO has permissions to do WHAT.  When you launch this tool it analyzes a users effective NTFS permissions for a specific file or folder, takes into account network share access, then displays the results in a nifty desktop dashboard!

Think of all the frustration that this free utility saves when you are troubleshooting authorization problems for users access to a resource.  Give this permissions monitor a try – it’s free!

Download Permissions Analyser – Free Active Directory Tool

Windows Server 2003 Shutdown Problem

YourServer: The computer is processing another action and thus cannot be shut down. Wait until the computer has finished its action, and then try again.(21)

This problem is caused by a Remote Desktop Connection using the /console switch to the Windows Server 2003 computer.

Solution, either get a hotfix for a permanent solution, else check the server’s remote connections for a temporary work-around.

Summary of Windows 2003 Remote Shutdown Command

 

 Server Shutdown Event Tracker – Boring Box

This section deals with a completely different setting.  Imagine that you wish to disable the annoying shutdown tracker found on Windows Server 2003.

As is so often the case, when you do not like a feature there is hidden way of turning it off.  In order to disable the Shutdown Dialog box, check out your group policy.  Ask yourself, would this be a Computer policy or a User policy?  The answer is Shutdown Event Tracker is a Computer policy.  Armed with this knowledge make sure that:

 a) You select the OU which containers the Windows 2003 server.

 b) You navigate to the Computer not the user part of group policy.

Complete Group Policy path to disable Shutdown Event Tracker:

    Local Computer Policy
           Computer Configuration
                  Administrative Templates
                          System

See more Windows Server Shutdown Commands

If you like this page then please share it with your friends

 


Related topics

Accounts   • Auditing  • IPSec  • Kerberos Tickets  • Windows RIS Server

LT2P and Certificates   • Security Snap-in  • Remote Shutdown