Use Powercfg to Control Laptops' Power-Management Settings

Sometimes manually configuring these settings isn't practical

At the hospital in which I work, the nurses use wireless laptops running Windows XP SP2 to access an application service provider (ASP) application. When the nurses stopped using the hosted application to perform other duties, the laptops went into standby mode, which caused the laptops to disconnect from the network and the hosted application. When the nurses would start using the laptops again, the connection to the network was automatically reestablished but not the connection to the hosted application. The nurses wanted to know whether there was a way to prevent the hosted application from disconnecting.

Manually disabling the standby mode in the Control Panel Power Options applet didn't work because the laptops weren't assigned to individual nurses. Thus, XP would reset to the default settings whenever a different nurse logged on to a laptop. With 15 laptops and more than 15 nurses, I felt like I was chasing my own tail.

I looked for a Group Policy Object (GPO) to control XP's power-management settings, but I couldn't find any. I finally found Powercfg, a command-line utility that's part of XP SP2 and later as well as Windows Server 2003 and later. You can use Powercfg to perform many tasks, including:

  • Finding out a machine's built-in power schemes (e.g., Always On, Minimal Power Management) and custom power schemes
  • Creating or deleting a power scheme
  • Finding out a power scheme's current settings (e.g., when to go into standby or hibernate mode)
  • Changing a power scheme's settings
  • Activating a power scheme

I decided to change the settings of the built-in Always On power scheme so that the standby and hibernate modes would be disabled when the laptops were plugged into electrical outlets. The following commands change those settings, then set Always On as the active power scheme:

powercfg /change "always on" /standby-timeout-ac 0
powercfg /change "always on" /hibernate-timeout-ac 0
powercfg /setactive "always on"

I incorporated these commands into the logon script used for the nurses. Now when a nurse logs on to one of the laptops, Powercfg configures the machine so that the standby and hibernate modes don't kick in. With this configuration, the laptop doesn't disconnect from the network and the hosted application continues to run even when the nurses are performing other duties.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.