Computer Performance, Windows Server 2003

 

Windows Server 2003 - Shutdown Commands

Shutdown Command in Windows Server 2003

Shutdown is an exciting new command line program available in Windows 2003 and XP.  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.  Consequently, take care when experimenting with this command - it is possible to have too much excitement!

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 that you really wish to restart.  For this reason, I start will by introducing you to the abort command:

Shutdown /a  Remember this is your get out of jail card, it cancels the shutdown.

Example: Shutdown  /a  /m \\ computername

Windows Server 2003  'Shutdown'  Topics

Shutdown Command - The basics

Microsoft have added Shutdown as a built-in executable to XP and Windows Server 2003. 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, then 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 Command - Select your victim

Now for the 'Remote Shutdown' switch /m \\victim.  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 name of a remote machine you wish to shutdown.  None of this syntax is case sensitive, thus sHUTDOWN /R /m \\ViCTim would work.

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

Shutdown Windows Server 2003 and XP command line  For the local machine, try 127.0.0.1 for example, shutdown /s /m \\127.0.0.1.  Useful in batch files.

Examples of Microsoft's Shutdown switch

shutdown /s /m \\victim    - Shuts down a remote machine called 'victim'.

shutdown /r /m \\exchange - Reboots a remote machine called 'Exchange'.  Observe how /r replaces /s from the previous example.

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

Shutdown Command - Add the extras

 /t for time.  Is 30 seconds too short (or too long) a time to wait for the server to shut down?  If so, you can adjust with /t: 60 to display the dialog box one minute. Maximum is 600 seconds.

/f for force.  This is what I call the 'Mr Nasty' switch.  A shut down 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 command?  Let people know who is in charge, who is shutting them down?  If so you could add: /c " Guy is shutting you down"

/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 Microsoft's 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 Shutdown in action

Solarwinds IpMonitorGuy recommends: The SolarWinds ipMonitor

My attraction to ipMonitor is because it inhabits that zone of part work, part play; Guy just could not put the dashboard away.  This excellent performance monitor will get you started in the quest to remove bottlenecks on your network.  SolarWinds provides this fully-functioning product free for 21 days.  So download and install ipMonitor, then start scrutinizing your computers CPU, memory and disk performance.  You can also select from zillions more performance counters such as fan temperature and battery level. 

Installing ipMonitor is a breeze, but learn from gung-ho Guy's mistake and install SNMP on each computer that you wish to monitor.  What sealed my unreserved recommendation of SolarWinds is their support team, you will get expert help even when you are evaluating the ipMonitor.

Download SolarWinds ipMonitor (21 days eval)

Shutdown Tracker - That Boring Dialog Box

And now for something completely different, this section deals with Microsoft's Shutdown Event Tracker.  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 that 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


TrainSignal - Recommended Training VideosActive Directory Training.  As an MCT trainer, I can thoroughly recommend TrainSignal because they provide practical hands on training.  In particular, I like the way that TrainSignal cover all learning methods, instructor lead, video and of course text material.  You can either take one module, for example Active Directory or go for a combination of modules.  See more about Active Directory training


Related topics

 *


Google

Webcomputerperformance.co.uk

GFi Events Manager

Guy Recommends: GFi EventsManager

Here is a solution to monitor, manage and archive thousands of events that are generated by devices across your entire network.  Get your free evaluation copy of GFI EventsManager.

 

Home Copyright © 1999-2008 Computer Performance LTD All rights reserved

Please report a broken link, or an error.