I am remoting into my work computer from my computer at home. At home I have Windows 7 Ultimate while at work I have Windows 7 Professional, both 64-bit and with admin privileges.

I would like to change the default action for the power button to Disconnect instead of Log Off but can't seem to do so. That way I won't have to do an extra click on the arrow to disconnect from the session.

the power button

I know that I can change the power button action locally by going to the Taskbar and Start Menu Properties dialog and changing the Power Button action in the Start Menu tab but it is disabled.

the properties page

I was hoping I could change it from the local group policy editor:

User Configuration
    Administrative Templates
        Start Menu and Taskbar
            Change Start Menu Power Button

but it looks like it only makes changes for when connected locally. I don't know where to look in the registry.

the group policy dialog

Is this button configurable for remote desktop sessions at all? Is there a policy/setting that I have to enable to be able to change this?

I would rather not have to use separate scripts just to disconnect if at all possible.

I previously was on Windows XP at work but at least then, the power button defaulted to Disconnect (instead of Shut Down) with the Log Off button right next to it so that was fine with me. I noticed that it is also disabled when remoting to my laptop (also Windows 7 Ultimate). There's a question on E-E asking about the same thing but on Windows Server 2008 and has a single response, doesn't look like it's resolved there though and I'm not going to register for that...

  • 9
    What's wrong with the 'x' button at the top of the remote desktop window? By using the Start Menu power button you risk accidentally shutting down the computer. – James P Mar 18 '13 at 12:46
  • @James, no he doesn't. Generally when you use the Start Menu on a remote machine, Shutdown and Restart are not available (you have to issue the shutdown command if you really want to do it.) – Windos Mar 20 '13 at 1:35
  • 1
    @Windos: It depends on the specific version of Windows. For instance, if I open an RDP session to Windows Server 2008 terminal services the "power" button on the Start menu shuts down the computer. On Windows 2003 there is a shutdown button and a log off button. Maybe this is not the same on desktop Windows versions but I still don't see the point in using the Start menu over the 'x' button at the top. – James P Mar 20 '13 at 9:31
  • 1
    @James: This isn't too much of a concern at the moment but IIRC, the main motivation for this was consistency. When finished with a remote desktop session, most of the time I want to just disconnect, others I needed to completely log off and I occasionally need to reboot. To be able to do all that, the start menu allowed me to do all. XP had a disconnect button along with log off so it was perfect then. That plus running VMware that has a similar interface, I have scripted shutdowns to do much more than that. I'd rather not have to worry about which program I'm using when I just want to quit. – Jeff Mercado Mar 20 '13 at 20:28
  • 2
    Ctrl-Alt-End, then Alt-L. Get into the habit of this, and you never accidentally shutdown a machine ever again. – Michael May 15 '13 at 2:41

Instead of changing the Start menu which might also not be feasible, you could define a desktop icon that does the disconnection.

Use the tsdiscon command to disconnect the current session :


The above article is for Windows 2000 Terminal Services (!), but the tsdiscon command still exists and I suppose that it still works. When I tried it, it logged me out but left all my programs still running.

| improve this answer | |

Check this key in the registry:


In the right pane of Advanced, double click on PowerButtonAction to modify it.

If PowerButtonAction doesn't exist, then right click on an empty area in the right pane of Explorer, click on New and DWORD (32-bit) Value, type PowerButtonAction, and press Enter.

Type in the Hexadecimal Value data number below for the Power Button option that you want, and click on OK.


Log Off: 1

Lock: 200

Restart: 4

Sleep: 10

Hibernate: 40

Shutdown: 2

The Hibernate option will not be available unless you enable hibernate and have turned off the Hybrid sleep option in the Power Plan Settings. If you are using Hybrid sleep, then you would select Sleep from below.

| improve this answer | |
  • i guess he asking for disconnect. will there be a hex value for it ? – user218473 Jul 29 '13 at 16:00
  • No, There is not ! for this action we have easier solutions then change power button... – Milad Abooali Jul 30 '13 at 12:50

See if this work?

Local Computer Policy > User Configuration > Adminstrative Templates > Start Menu and TaskBar > Remove Logoff on the Start Menu > Enabled


Local Computer Policy > Computer Configuration > Administrative Templates > Window Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment > Remove "Disconnect" Option from Shutdown Dialog > Disabled

Finally, remove your user account to connect to the server right's to shutdown the computer.

Local Computer Policy > Computer Configuration > Windows Settings > Security Settings ? Security Options ? Shutdown: Allow system to be shutdown without have to logon > Disabled.


Local Computer Policy> User Configuration > Administrative Templates > Start Menu and TaskBar > Remove and prevent access to the Shut Down, Restart, Sleep and Hibernate Command > Enabled

Then the only remaining option should be disconnect.

Use shutdown -i from an remote machine with Admin account if you need to shutdown or reboot it.

| improve this answer | |
  • 1
    i actually recall that we once have a legacy answer program which have to remain login, everytime the operator goes in checking log and accidental logoff, all the voice channel are dead. – user218473 Apr 30 '13 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.