Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Is there a way to shutdown my headless Windows XP Pro machine remotely?

Question: I have a couple of machines on my local network that I only access via Remote Desktop Connection. They are “headless” – meaning that they have no keyboard, mouse or monitor attached. When I access them remotely, there is no “Turn Off Computer” item on the Start Menu. How do I turn it off, or restart it?

And as you’ve seen, when you use Remote Desktop to get to your machine, the “Turn Off Computer” item is missing from the Start menu. To be honest, I’m not really sure why Microsoft chose to do that, it is inconvenient.

But we have ways.

Become a Patron of Ask Leo! and go ad-free!

I previously recommended using a copy of psshutdown from the folks over at This is a command line tool that will allow you to shut down or restart a computer remotely. It actually has several options to control how quickly, whether to force running applications to close, and so on. It’s quite handy for batchfiles and to create shortcuts for shutting down.

“As it turns out Task Manager already has what we need.”

Another approach doesn’t involve downloading any additional software. As it turns out Task Manager already has what we need.

On the remote machine, right click on the clock, and select Task Manager. Task Manager has a Shutdown menu, which includes items to Turn Off and Restart. Those do the same thing as the missing Start Menu items.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

51 comments on “Is there a way to shutdown my headless Windows XP Pro machine remotely?”

  1. Another way is to choose Windows Security from the Start menu. This will bring up a dialog box that has a Shut Down button that has the Log Off, Shutdown, Restart, Disconnect, and Standby options.

  2. Good tip, Mark. Unfortunately the Windows Security menu item disappears if you customize and choose “classic start menus”. The good news, though, is that the task manager, which is what that really is, is also accessible if you right-click the date in the task bar, and choose “task manager”. It has the Shutdown menu with all the options you list.

  3. Windows XP Professional has built in support for shutdown via the “shutdown” command. Here is the useage:

    C:\shutdown /?
    Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c “comment”] [-d up:xx:yy]

    no args Display this message (same as -?)
    -i Display GUI interface, must be the first option
    -l Log off (cannot be used with -m option)
    -s Shutdown the computer
    -r Shutdown and restart the computer
    -a Abort a system shutdown
    -m \\computername Remote computer to shutdown/restart/abort
    -t xx Set timeout for shutdown to xx seconds
    -c “comment” Shutdown comment (maximum of 127 characters)
    -f Forces running applications to close without warning
    -d [u][p]:xx:yy The reason code for the shutdown u is the user code p is a planned shutdown code xx is the major reason code (positive integer le
    ss than 256) yy is the minor reason code (positive integer less than 65536)

  4. NT/XP Cross-machine authentication is a confusing topic, to be sure. The bottom line is that the account you’re logged into on machine A must be recognized by machine B and have appropriate permissions to shut down machine B. Depending on how things are set up the accounts setup could be as simple as having the same account user/password on both machines. It could be as complicated as a full Windows NT Domain or Active Directory entry.

    From: :

    “To perform this procedure, you must have the user rights to force a shutdown from a remote system.”


  5. I have tried to run a task used “psshutdown” with -f -k -t and “windows xp shutdown command” with -f -s -t from Symantec Ghost console. However every time machine has restarted instead power shut. Any idea.

  6. I lost the ability to shutdown my pc from the start menu. The red button beside logoff is missing and i have to logoff first then shutdown which is pointless …… help me out and if you can e-mail me the response….

    ** E-Mail:

  7. Shutdown can be missing if you’re using remote desktop or terminal services, but I’ve not found a scenario where it disappears on its own. If the logoff button were also not visible that’d be a different scenario, but it sounds like you can logoff just fine.


  8. I would point you at using WMI. This isn’t per se, but:

    Set OpSysSet =
    GetObject(“winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//machinename “).ExecQuery(“select * from Win32_OperatingSystem where Primary=true”)

    for each OpSys in OpSysSet


  9. Hi
    when I call the script from vb program
    Set OpSysSet =
    GetObject(“winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//machinename “).ExecQuery(“select * from Win32_OperatingSystem where Primary=true”)

    it give automation error
    Can any 1 tell me the problem, I am using WinXP Pro

  10. Shutdown option is missing from shutdown menu when u say shutdown, I dont get shutdown option only i get is log off option pls give solution on it the os is Windows 2000

  11. …there’s also a builtin windowns command…


    it takes several options (force, reboot, timeouts etc)

    shutdown /? gives help

  12. If you have another windows box with either windows 2000 or windows XP on it then you can use the manage MMC to connect to this machine and shut it down that way.

    First ‘Right Click on ‘My Computer’ and select ‘manage’ (or type compmgmt.msc into the run window)

    Then Right Click on ‘Computer Managment(Local)’ and select ‘connect to another computer’.

    Select your computer from the list and connect to it with an admin account.

    When the screen refreshes, click on ‘Computer Management(Computer Name)’ (where computer name is the name of your remote computer) and select ‘properties.

    Then select the advanced tab.

    Then select the ‘startup and recovery’ button.

    Then use the shutdown tool that is provided to log off, shut down, or reboot the computer.

  13. Two very easy “tricks” to shutdown Windows XP Pro while using remote desktop (and it doesn’t need you to download a thing!).

    1. Press CTRL-ALT-HOME. This will bring up the Windows Security dialog offering a nice “Shutdown…” button. Choose your shutdown flavor (Shutdown, Reboot, etc)

    2. If that doesn’t work (sometimes 1. just brings up the taskmanager), use the command “shutdown” from the Run dialog or command prompt. It needs some parameters.

    eg. I use “shutdown -s -t 01” to shutdown my Pc or “shutdown -r -t 01” to reboot it. To view shutdown’s parameters try “shutdown /?” from a command prompt.

  14. To shutdown make shortcut to:

    shutdown -s -t 01

    To reboot:

    shutdown -r -t 01

    You can use the Windows icons and place the shortcuts in the quickstart bar for a nice look.

  15. hey who tell me …. when i want to go my house i remember that i was not shutdown my office computer and i have his IP or computername so plzz how can i shutdwon it with our remoly in the commant prompt

    waxa aan ahay somali ee cidii somali ah haklan ka igala soo xidhiidhi

  16. 1. Log in remotely via Remote Desktop.
    2. Click somewhere on desktop (no on icon or taskbar).
    3. Press ALT + F4
    4. Procceed as you desire.

  17. just install RealVNC and you can run the remote XP machine as if you actually had keyboard and mouse attached.. free and simple…

  18. Nice and usefull artice, thanks

    Now if there was a way to hook this shortcut to the machine’s power button … Unfortunately pressing power button displays a “there are users logged in …” confirmation dialog, which is quite useless on a headless machine.

  19. OK, I have windows XP PRO and I have tried all the things in this thread to shut down my computer that I use. and it wont work. I make a .bat and a .cmd whitch are both window command exe’s

    Plese simple tell me what to enter into one of these to shut down the system. and is there a way to make it so i dont have to specify a computer naem tht way anyone can use it from any of the users on the computer.

  20. hey can somene plz plainly write a command that you can turn any computer off on the network in a .bat file

    i want to turn my second computer off from my other one

    thanx anyone

  21. iwant to restart my pc remotely using ip address it was connected remotely but now loged off and now i am not able to connect my pc remotely. hot to restart remotely i know the ip address or remote pc.

  22. if you can get onto the remote computer using RDP then you just need to press ALT+F4 and select the desired operation.

    if doing it from command prompt type:

    shutdown -s -m \\COMPUTER NAME OR IP -t 00

    use -r or -l instead of -s to invoke reboot or log off.

  23. You can turn off any networked Windows 2000 and XP machine with the following command-line tool:
    shutdown /m \\computername /s

    If you want more info on this command-lind tool just type: shutdown /?

  24. Not if the account you’re currently logged into doesn’t have administrative privileges on the machine you’re trying to reboot.

  25. Leo is right. If you do not have administrative priviledge you cannot run the task manager and the shutdown command is denied. In this case I recommand the following freeware:
    This freeware allows you to create a shortcut that can do almost any action on the pc.

  26. Here is solution:

    When you are in remote desktop, press:

    ctrl+alt+END – classic ctrl+alt+del window appears.

    Click on Shutdown….

  27. Oh thats realy simple go to the command prompt type:
    c:\tsshutdn \server:ip address or computer name \powerdown
    if u need restart change \powerdown to \restart

  28. Stangely, I just attempted a shutdown on my company’s email server (not on our domain) and it worked. It shouldn’t without the right admin permissions, but it did. So give it a try if you ever need it.

  29. I find Shutdown.exe to be pretty useful. I perform a net use \\\ipc$ /u: and then can run shutdown.exe -f -r -m \\ and in about 30-60 seconds I can tell it’s rebooting by using a ping -t in another command window. When the Request Time Out quit and it starts responding that’s a nice clue that the OS is booting back up again.

  30. Hi,

    I really don’t know where the Remote Desktop is gone, i don’t see it anymore in any of my accounts. I’ve looked everywhere in Program Files logged in as an admin and nothing, i really don’t know where is gone. How can i find it again????

  31. The task manager will not have the “Shut Down” dialog if you are not using the welcome screen. This option is changed in the Control Panel under User Accounts and “Change the way users log on or off”. You don’t have to enable the memory hungry annoying welcome screen if you want to shut down remotely though, and a lot of company computer won’t have this option because they are logging onto a domain. To shut down when you do not have the welcome screen enabled, simply press ctrl+alt+end in the Remote Desktop session. This will bring up the same dialog as the “Windows Security” option in the start menu, and from here you can shut down or restart your machine. To disable this option for remote users use the group policy editor.

  32. We run in a domain enviroment. I found it easy to download psshutdown from but you could also create a batch file on the desktop that executes shutdown -r. I add -t 10 to shorten the wait. The downside it that you must have admin privledges to execute either method.

  33. There is an utility named process explorer in this allows you to replace the task manager with a more powerful utility and at the same time you will have what you need. When the app. is running minimized with te right button of your mouse you’ll see the shutdown menu. It works I have it on all my machines.

  34. There is also a way to call the shutdown / logoff / restart dilog box programmatically: copy and paste the following code into a .vbs or .vbe file and run it:

    ‘beginning of code
    ‘allows one to remotely bring up the shutdown dialogbox in Windows
    Set WshShell = WScript.CREATEOBJECT(“shell.application”)

  35. HI
    You can use ALT F4 to shut down your head less machine if you are using them remotly. and can use the command shutdown -a machnename


Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.