Wednesday, May 5, 2010

powercfg - A Good Thing Microsoft Did

A lot of people like to bash Microsoft and probably rightly so. But I think with Industry Giants as with anything else really, it’s important to take the good with bad. So I’m writing a series on all the Good things I’ve seen come out of Redmond recently. The kinds of things that make me go “Yeah! They’re finally getting it! They’re more in touch with the poor slobs out in the field who have to work with this stuff!” So over the next week I’ll post articles on the little features that I have found pleasantly surprising.

Check this out! Ever wondered why your PC won’t go to sleep when you want it to? Or ever been surprised by a sleeping PC waking up on its own? Or have you pondered how to expose the finer details of windows power management?

Well the command line tool powercfg is where it’s at! Windows Power Managment tools of the past have been a little hit and miss. But with this new tool it’s much easier to peak behind the curtain and get a handle on what’s really happening power-wise.

For example the following line will list all those devices that can wake your PC from sleep.

powercfg -devicequery wake_armed

Handy yeah? Ok how about this?

powercfg -requests

This one lists all the “objects” that have asked nicely for the computer not go to sleep! Super handy! Well ok handy when you’ve got a PC that won’t sleep anyway.

Here’s another one I’ve been using recently;

powercfg -energy

This creates a report energy_report.html that details any power issues you should be aware of. Go and run it now... I BET you change some power management settings after seeing this report!

There’s lots more to this app, you can manage power profiles from the command line which means you can script power profile changes. So if Group Policy won't give you what you need powercfg just might! Have a look at the documentation and see for yourself.

Don’t forget to check back during the rest of the week for other features that you may find useful one day.