Sunday, August 16, 2009

Changing the Windows 7 Start Menu Power Button Default

Windows 7 has a really nice, yet often ignored, feature for setting the default for the Power button on the Start Menu.  By default, this is set to “Shutdown”, but in many situations it works better to be set to something else, such as “Log off” or “Hibernate”, etc.  The good news for those working within an Active Directory environment is that you have Group Policy services to help enforce this on a large scale, without having to walk around (or remote into) a lot of machines.

Note: I’m a HUGE proponent of scripting, so anytime I suggest you can forego scripting it’s not a trivial statement.

If you’re not familiar with what I’m talking about, the image below should clarify this a bit. When you click on the Start Menu button (or “Orb” or whatever the hell it’s called now), you will see a button to the bottom right that normally says “Shutdown”.  This is the “Power button”.  In this example you can see it is set to “Log off”.

blog1

If you Right-Click on the Power button and choose “Properties”, you can set this default manually.  To do this, click on the “Start Menu” tab of the “Taskbar and Start Menu Properties” dialog form.  In the upper part of this form panel is a listbox with the label “Power button action:”  Simply change it to whatever you prefer (see figure below):

blog4

The available options are:

“Shutdown”

“Log off”

“Lock”

“Restart”

“Switch User”

“Sleep”

 

For desktop computers, you might not want “Sleep”, but you might want that as the default for mobile devices such as Laptops and Netbooks, etc.  Setting his manually is easy enough.  But what if you want to make this setting the default on 500 or 5,000 computers?  Fortunately, there is a very simple solution.

You can use Group Policy services.  You can either remote into one of your Windows Server 2008 (WS08) domain controllers, or use RSAT from one of your Windows 7 clients.  Either way, click on the Start Menu and click “Administrative Tools”, and select “Group Policy Management”.  If you’ve used GPMC in the past, this will look very familiar, because it is essentially the same thing (with some minor improvements).

Note: This particular setting is only available if you have at least one WS08 domain controller in your Active Directory environment.  It will only apply to Windows 7, or WS08 R2 computers, and later.  It has no effect on Windows XP, Windows Vista, Windows Server 2003 or Windows Server 2008 computers.

You can either modify an existing Group Policy Object (GPO) or create a new one.  I always recommend keeping settings isolated within GPO’s to avoid confusion and allow for easier troubleshooting and management.  For example, I create a “Desktop Settings” GPO to store my settings for Desktop, Task Bar and Start Menu settings.  This isn’t a requirement, but simply a recommendation.  Once you have a GPO ready, right-click on it and select “Edit”.  Then expand the “User Configuration” tree, and expand “Policies” / “Start menu and Taskbar” and double-click on “Start Menu power button” (see figure below).

blog2

This setting has a fairly simple dialog form for setting the desired power button option.

blog3

Simply change the setting from “Not Configured” to “Enabled” and then select the desired option from the listbox in the lower-left panel (e.g. “Log off”).  Then click “Apply” and “Ok”.  All of your Windows 7 and Windows Server 2008 R2 computers that are within scope of this GPO will acquire this setting on their next refresh cycle (on next user logon, or by default every 90 minutes thereafter).  You can use the GPUPDATE command to force the update sooner if you like, which is a good idea for testing.

Note: There are many other GPO settings you can use to configure related features on the Start Menu and Taskbar.  This is only one example.

I hope you find this helpful.

2 comments:

Unknown said...

Any suggestions as to why its not appearing under group policy editor, windows 2008 domain and viewing under windows 7.

Does it need 2008 R2 DC?

regards

skatterbrainz said...

I don't know why your options would be different. I'm not using WS08 R2 at all. Just Windows 7 and Windows Server 2008 SP2. I'm creating and editing my GPOs using RSAT from a Windows 7 client.