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 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.
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.
Watch the video: Restarting Windows XP Remotely where I walk through the steps using Task Manager.
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.
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
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)
But how does the remote computer authenticate you with this shutdown command?
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
Oh⊠and the sysinternals tool psshutdown allows you to specify a user & password, bypassing the cross machine account confusion altogether.
Leo
For XP users, why not just click on the Desktop and just click on Alt+F4, which should bring up the shutdown,restart, window.
excellent that last comment my friend.. well done it worked like a dream.
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.
please send me the method to shutdown remote machine using vb.net code.
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
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
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
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
did you replace âmachinenameâ with the name of the target machine? What version of VB?
Leo
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
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
âŠthereâs also a builtin windowns commandâŠ
shutdown
it takes several options (force, reboot, timeouts etc)
shutdown /? gives help
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.
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.
Whoops, that key combo is CTRL-ALT-END. >.<
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.
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
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.
just install RealVNC and you can run the remote XP machine as if you actually had keyboard and mouse attached.. free and simpleâŠ
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.
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.
@echo off
shutdown -r -f
what i have in my .cmd file now
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
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
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.
How do I shut down a computer using only an IP? Keep in mind, this computer is not on a network with mine.
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 /?
Not if the account youâre currently logged into doesnât have administrative privileges on the machine youâre trying to reboot.
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.
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.
Here is solution:
When you are in remote desktop, press:
ctrl+alt+END â classic ctrl+alt+del window appears.
Click on ShutdownâŠ.
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
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.
Dear Leo
Wonder how to you startup and shutdown pc using scheduled task manager.
Thanks and Reagrds
Ram
shutdown -i -> Add 127.0.0.1 done!
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?
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.
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.
Start > Run > âshutdownâ
âshutdown -râ if you want a restart.
Donât include the ââ
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????
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.
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.
There is an utility named process explorer in http://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.
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()
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