Helping people with computers... one answer at a time.

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.

I previously recommended using a copy of psshutdown from the folks over at Sysinternals.com. 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.

VideoWatch the video: Restarting Windows XP Remotely where I walk through the steps using Task Manager.

Article C2469 - November 23, 2005 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

51 Comments
Mark
August 11, 2003 8:38 PM

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.

Leo
August 12, 2003 7:39 PM

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.
Thanks!
Leo

Brent
August 28, 2003 3:37 PM

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)

bero
September 10, 2003 10:53 AM

But how does the remote computer authenticate you with this shutdown command?

Leo
September 10, 2003 8:05 PM

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:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/windowsserver2003/proddocs/datacenter/rrcHowToShutdownRemotely.asp :

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

Leo

Leo
September 10, 2003 8:06 PM

Oh... and the sysinternals tool psshutdown allows you to specify a user & password, bypassing the cross machine account confusion altogether.

Leo

erixon
October 15, 2003 2:08 PM

For XP users, why not just click on the Desktop and just click on Alt+F4, which should bring up the shutdown,restart, window.

porksaber
January 14, 2004 3:28 AM

excellent that last comment my friend.. well done it worked like a dream.

Michael Chang
March 7, 2004 8:21 PM

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.

yash
March 17, 2004 10:24 PM

please send me the method to shutdown remote machine using vb.net code.

MikeC
March 18, 2004 12:34 PM

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....

PLEASE E-MAIL
** E-Mail: mike.cordeiro@symaptico.ca

Leo
March 22, 2004 3:35 PM

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.

Leo

Leo
March 22, 2004 3:38 PM

I would point you at using WMI. This isn't VB.net per se, but:

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

for each OpSys in OpSysSet
OpSys.Reboot()
Next

Leo

rafi
April 4, 2004 10:13 AM

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

Leo
April 4, 2004 10:17 AM

did you replace "machinename" with the name of the target machine? What version of VB?
Leo

Abbas
April 20, 2004 1:04 AM


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

Leo
April 20, 2004 8:37 AM

Have you tried psshutdown as described in the article these comments accompany? (http://ask-leo.com/archives/000003.html )
Also, fire up task manager, which has a shutdown menu.

Good luck!

Leo

carl bryan
May 23, 2004 2:23 AM

...there's also a builtin windowns command...

shutdown

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

shutdown /? gives help

Chris E.
September 24, 2004 10:14 PM

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.

Chris
November 12, 2004 8:53 AM

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.

Chris
November 12, 2004 8:54 AM

Whoops, that key combo is CTRL-ALT-END. >.<

Dennis
November 17, 2004 11:44 AM

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.

warsame
February 26, 2005 4:37 AM

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 helsinki@hotmail.com

Roberts Rozis
March 1, 2005 10:11 PM

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.

DW
March 3, 2005 2:30 PM

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

zodik
March 8, 2005 9:48 AM

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.

Dex
May 15, 2005 2:12 AM

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.

Dex
May 15, 2005 2:35 AM

@echo off
shutdown -r -f

what i have in my .cmd file now

Sim
June 5, 2005 4:08 AM

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

ali
June 5, 2005 4:54 AM

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.
thanks

bean
September 15, 2005 7:13 AM

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.

Michael
October 10, 2005 4:56 PM

How do I shut down a computer using only an IP? Keep in mind, this computer is not on a network with mine.

Richard
October 11, 2005 8:48 PM

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 /?

Leo
October 11, 2005 9:05 PM

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

Finna
November 11, 2005 1:12 PM

Why make it so hard? Log in via remote desktop, open Task manager (right-click the task bar) and choose restart from the Shutdown menu.

Gaspard
December 3, 2005 5:48 AM

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: http://grc.com/wizmo/wizmo.htm.
This freeware allows you to create a shortcut that can do almost any action on the pc.

Eso
January 1, 2006 4:32 AM

Here is solution:

When you are in remote desktop, press:

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

Click on Shutdown....

Daniel
January 13, 2006 7:13 AM

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

David Sumich
March 16, 2006 3:07 PM

Alt+F4 is a good one as it now seems that the Shutdown menu is not part of Task Manager anymore? I don't see it on mine with XP SP2.

Ram
April 3, 2006 8:53 PM

Dear Leo

Wonder how to you startup and shutdown pc using scheduled task manager.

Thanks and Reagrds
Ram

cristig
June 29, 2006 8:23 AM

shutdown -i -> Add 127.0.0.1 done!

Rich
August 2, 2006 10:36 AM

Alt-F4 and Ctrl-Alt-End work great but my coworker who has XP SP2 also does have the Shutdown menu in Task Manager and I don't. Why?

Coupland
August 31, 2006 10:52 AM

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.

Shane
October 10, 2006 11:49 AM

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.

Joe
October 15, 2006 3:43 PM

Start > Run > "shutdown"

"shutdown -r" if you want a restart.

Don't include the ""

Chris
December 18, 2006 2:59 PM

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????

Michael Boratko
December 29, 2006 9:03 AM

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.

Guy
February 28, 2007 9:11 AM

We run in a domain enviroment. I found it easy to download psshutdown from sysinternals.com 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.

Arturo Alvarez
June 20, 2007 11:55 AM

There is an utility named process explorer in www.sysinternals.com. 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.

Peter Wanyonyi
May 26, 2008 10:06 PM

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")
WshShell.ShutdownWindows()

Amardeep Rana
May 29, 2008 4:13 AM

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

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to http://askleo.com/ask to ask your question.