Wednesday, 15 March 2017

Windows Restart or Shut Down a Remote Computer

Please note both these procedures require an Administrator group level access, or equivalent, on the remote computer.

Using a Windows Interface

To restart or shutdown a remote computer and document the reason in the log files using the Windows interface you will need to do the following:
  1. Open the Command Prompt window by pressing "Windows" + "R" and type "CMD" and hit "Enter"/"OK"
  2. Type "shutdown /i" to display the Remote Shutdown dialog box (the Shutdown.exe file found in the Windows directory)
  3. Click the "Add" button to enter the associated computer names you wish to shutdown/restart or click "Browse" to open the "Find Computers" dialog box
  4. Under "What do you want these computers to do", click "Restart" or "Shut down" and options for warning any logged in users.
  5. Select an appropriate reason for the restart or shutdown from the list and enter in any details to be logged in the "Shutdown Event Tracker" section

Using the Command Prompt

To restart or shut down a remote computer and document the reason using the command line
you will need to follow the process below (Win7):

  1. Select the "Start" button
  2. Click "All Programs"
  3. Next select "Accessories"
  4. Click "Command Prompt"
  5. Type the following into the command line:
    • shutdown /[r|s] /m \\ComputerName /c "Comment" /d [u|p] <xx>:<yy>
      • /r        = Shutdown and restart the computer
      • /s        = Shutdown the computer
      • /m       = Specify the target computer
      • /c        = Comment on the reason for the restart or shutdown.(512 characters max)
      • /d        = [p|u:] xx:yy  Provide the reason for the restart or shutdown.
        • p = Indicates that the restart or shutdown is planned
        • u = Indicates that the reason is user defined
          • If neither p nor u is specified the restart or shutdown is unplanned
          • xx is the major reason number (positive integer less than 256)
          • yy is the minor reason number (positive integer less than 65536)
          • System Shutdown Reason Codes
  6. and then press ENTER