Windows 7 has a new switch for the built-in Powercfg command, it's called
-energy. Appending this switch is invaluable when troubleshooting sleep
problems, particularly on Windows 7 laptop or notebook computers.
Every Control Panel applet, including the Power Options cpl, has at least
4 alternative ways of changing its settings.
GUI - It's always worth LOOKING at the settings and getting a feel
of what's possible.
Registry - Essential where there is no GUI for a setting.
Group Policy - Especially useful for setting multiple machines in a
domain.
Scripting with PowerShell (or VBScript).
Built-in Command line utility, such as powercfg.
If you are going to examine the settings of an item in the Control
Panel then only a DOS extremist would eschew at least take a peak at the GUI.
If you are troubleshooting, and the GUI does not get the job done, then
where do you turn next? Probably the Group Policy editor, or maybe
the Registry. Yet in the case of Power Options I would place the
command line powercfg as the number 2 tool for examining sleep and
hibernation settings.
I start by clicking the Start Orb, Type 'cmd', remembered to right-click
and 'Run as administrator'. Now I am ready to type the command
powercfg. Actually one of the first switches I use is the ubiquitous -?
Next I recommend trying the -devicequery
switch. I mention this because it initially I could not get it to
work, then I realized that: powercfg -devicequery needed another parameter
for example:
powercfg -devicequery wake_up_from_S3_supported or powercfg -devicequery
wake_from_any
The reason that I chose this example was to encourage you study the help
(powercfg -?), and thus get into the rhythm of this command. powercfg
-MainSwitch Further_refinement. If you can do this then I declare you
an expert on Powercfg, and I wish you good luck in researching your specific
sleep or hibernate problem.
Guy Recommends: SolarWinds Engineer's Toolset v10
The Engineer's Toolset v10 provides a comprehensive console of utilities
for troubleshooting computer problems. Guy says it helps me
monitor what's occurring on the network, and the tools teach me more about how the system
itself operates.
There are so many good gadgets, it's like having free rein of a
sweetshop. Thankfully the utilities are displayed logically: monitoring, discovery, diagnostic, and Cisco tools.
Download your copy of the Engineer's Toolset v 10
The secret of success is that once this command 'powercfg -energy' completes, you type,
'energy-report.html'. Now you should see a browser pane with detailed
information about what happens when the laptop tries to sleep.
My first point is that the powercfg command is harsh on errors. Even
machines that seem to be working fine generate at least 3 Errors. The
reason that I recommend running powercfg -energy is to set you on the
correct path when trying to track down a serious sleep or hibernate problem.
Trap 1 The command: powercfg -energy only works with Windows 7 (Not Windows Server 2008)
Trap 2 The energy-report.html file is created in the
current directory. Guy thought that it was always created in the
\windows\system32 folder - wrong. These days before I create a report
with -energy I cd: to a folder on my e:\ drive.
Bonus - Check Your Battery Capacity Status
Look for a similar entry at the bottom of your report.
Battery:Battery Information Battery ID Sony Corp. Manufacturer
Sony Corp. Serial Number Chemistry LiOn Long Term 1 Design
Capacity 57720 Last Full Charge 57720
More Troubleshooting Ideas
Try: powercfg -lastwake or powercfg -devicequery wake_armed
Guy Recommends: SolarWinds LANSurveyor
LANSurveyor will produce a neat diagram of your network topology. But that's
just the start;
LANSurveyor can
create an inventory of the hardware and software
of your machines and network devices. Other neat features include dynamic
update for when you add new devices to your network. I also love the ability to export
the diagrams
to Microsoft Visio.
Finally, Guy bets that if you take a free trial of LANSurveyor then you will
find a device on your network that you had forgotten about, or someone else
installed without you realizing!
I have found these two settings in the registry, but I am not impressed
they don't seem to 'work'. Normally I love tweaking the
registry, but in the case of powercfg, it's the command line that gets the
job done for me.
If we research CurrentPowerPolicy, then I have discovered two
contradictory explanations. I say again, this was a fruitless journey
for me, but if you make sense of these values, then please do let me know.
0 - Home/Office desktop 1 - Portable/Laptop computer 2 - Monitor
on for presentations 3 - Network computer (no Wake-on-LAN) 4 -
Optimized for high performance 5 - Optimized for power saving
Index Power setting
type For use on 0 Power Saver AC 1 Power Saver DC 2 Balanced AC
3 Balanced DC 4 High Performance AC 5 High Performance DC
Summary of Windows 7 Powercfg -energy
Windows 7 has a new switch for the built-in Powercfg command, it's called
-energy. This technique is invaluable for troubleshooting sleep
problems, particularly on Windows 7 laptop or notebook computers.
Windows Management Instrumentation (WMI) is one of the hidden
treasures of Microsoft operating systems.
Fortunately, Solarwinds
have created the
WMI Monitor so that you can examine these gems of
performance information for free. Take the guess work out of which
WMI counters to use for applications like Microsoft Active Directory,
SQL or Exchange Server.