Windows server 2003 and Windows XP – How to change power management options via command line

Posted by aidas | Posted in Command line, Windows 2003, Windows XP | Posted on 12-05-2009

0




This post will show you how to use command line tool powercfg to change power management options. Lets say we need one power-scheme policy for all our portable computers. In this case we will use command line tool powercfg and create bat script which will be distributed to all portable computers users as logon script. Requirements are:

* power-scheme must be set to “Portable/Laptop”
* plugged in monitor turn off – Never
* on battery monitor turn off – 15 min
* plugged in system standby – Never
* on battery system standby – 25 min
* plugged in hard disks turn off – Never
* on battery hard disks turn off – 45 min

To create script open notepad and type:

REM Set power-scheme to Portable/Laptop
powercfg /setactive “portable/laptop”
REM Set plugged in monitor timeout to Never
powercfg /change “portable/laptop” /monitor-timeout-ac 0
REM Set on battery monitor timeout to 15 minutes
powercfg /change “portable/laptop” /monitor-timeout-dc 15
REM Set plugged in system standby to Never
powercfg /change “portable/laptop” /standby-timeout-ac 0
REM Set on battery system standby to 25 minutes
powercfg /change “portable/laptop” /standby-timeout-dc 25
REM Set plugged in hard disks timeout to Never
powercfg /change “portable/laptop” /disk-timeout-ac 0
REM Set on battery hard disks timeout to 45 minutes
powercfg /change “portable/laptop” /disk-timeout-dc 45

Save file as power.bat and distribute to your notebook users as logon script manually or through group policy

Note that you can type powercfg /? in command line for more power management examples

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • Blogosphere News


Follow us on Twitter !
Follow us on Twitter!


Write a comment