Solved

change power settings on remote computer

Posted on 2014-01-09
10
2,700 Views
Last Modified: 2014-01-21
is there a way to change the power configuration on a remote system for a specific user?
i can do the following:
cmd.exe /c psexec \\ipaddress -u username -p password powercfg /change scheme /standby-timeout-dc 0

Open in new window

that works fine and dandy for the administrator
but how do i do it for say guest user or training or whatever?

Thanks!
0
Comment
Question by:bbimis
  • 5
  • 5
10 Comments
 
LVL 19

Expert Comment

by:Thommy
ID: 39770234
To change power settings user MUST be an administrator!!!!

Managing Power Options as a non-administrator
0
 
LVL 19

Expert Comment

by:Thommy
ID: 39770245
Users must have a least write access to following registry keys:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Controls
Folder\PowerCfg
0
 
LVL 19

Expert Comment

by:Thommy
ID: 39770252
0
 

Author Comment

by:bbimis
ID: 39771004
thats fine as being an administrator, but when i run a psexec as the admin it only changes it for the current user which is "administrator" i'm wanting to change it that way for All users.
0
 
LVL 19

Expert Comment

by:Thommy
ID: 39771327
Which is your Windows version?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:bbimis
ID: 39771423
i'm running a windows 7 machine doing a remote connection to an xp box.
0
 

Accepted Solution

by:
bbimis earned 0 total points
ID: 39786402
found registry solution
0
 
LVL 19

Expert Comment

by:Thommy
ID: 39787758
Can you please post your solution for the EE community?

Thank you very much...
0
 

Author Comment

by:bbimis
ID: 39788480
Make a reg file with the following content
Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg]
"CurrentPowerPolicy"="3"

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg\GlobalPowerPolicy]
"Policies"=hex:01,00,00,00,06,00,00,00,03,00,00,00,00,00,00,00,06,00,00,00,03,\
  00,00,00,00,00,00,00,02,00,00,00,03,00,00,00,00,00,00,00,02,00,00,00,03,00,\
  00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,01,00,00,\
  00,00,00,00,00,01,00,00,00,03,00,00,00,02,00,00,00,00,00,00,c0,01,00,00,00,\
  05,00,00,00,01,00,00,00,0a,00,00,00,00,00,00,00,03,00,00,00,01,00,00,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,02,00,00,00

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg\PowerPolicies]

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg\PowerPolicies\0]
"Name"="Home/Office Desk"
"Description"="This scheme is suited to most home or desktop computers that are left plugged in all the time."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,\
  00,00,00,00,00,00,00,b0,04,00,00,3c,00,00,00,32,32,00,00,04,00,00,00,05,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,78,00,00,00,08,07,00,00,58,02,00,\
  00,01,01,64,50,64,64,00,00

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg\PowerPolicies\1]
"Name"="Portable/Laptop"
"Description"="This scheme is designed for extended battery life for portable computers on the road."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,\
  00,00,00,00,00,00,00,b0,04,00,00,2c,01,00,00,32,32,00,00,04,00,00,00,05,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,78,00,00,00,08,07,00,00,b4,00,00,\
  00,01,01,64,50,64,64,00,00

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg\PowerPolicies\2]
"Name"="Presentation"
"Description"="This scheme keeps the monitor on for doing presentations."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,84,03,00,00,32,32,03,02,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,2c,01,00,\
  00,01,01,50,50,64,64,00,00

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg\PowerPolicies\3]
"Name"="Always On"
"Description"="This scheme keeps the computer running so that it can be accessed from the network.  Use this scheme if you do not have network wakeup hardware."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,2c,01,00,00,32,32,00,00,04,00,00,00,05,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,78,00,00,00,10,0e,00,00,b4,00,00,\
  00,00,01,64,64,64,64,00,00

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg\PowerPolicies\4]
"Name"="Minimal Power Management"
"Description"="This scheme keeps the computer on and optimizes it for high performance."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,2c,01,00,00,32,32,03,03,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,2c,01,00,00,00,00,00,00,84,03,00,\
  00,00,01,64,64,64,64,00,00

[HKEY_USERS\.DEFAULT\Control Panel\PowerCfg\PowerPolicies\5]
"Name"="Max Battery"
"Description"="This scheme is extremely aggressive for saving power."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,05,\
  00,00,00,00,00,00,00,b0,04,00,00,78,00,00,00,32,32,03,02,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,3c,00,00,00,00,00,00,00,b4,00,00,\
  00,01,01,64,32,64,64,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg]
"CurrentPowerPolicy"="3"

[HKEY_CURRENT_USER\Control Panel\PowerCfg\GlobalPowerPolicy]
"Policies"=hex:01,00,00,00,06,00,00,00,03,00,00,00,00,00,00,00,00,00,00,00,03,\
  00,00,00,10,00,00,00,02,00,00,00,03,00,00,00,00,00,00,00,02,00,00,00,03,00,\
  00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,01,00,00,\
  00,00,00,00,00,01,00,00,00,03,00,00,00,02,00,00,00,04,00,00,c0,01,00,00,00,\
  02,00,00,00,01,00,00,00,0a,00,00,00,00,00,00,00,03,00,00,00,01,00,01,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,00,\
  00,02,00,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies]

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\0]
"Name"="Home/Office Desk"
"Description"="This scheme is suited to most home or desktop computers that are left plugged in all the time."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,\
  00,00,00,00,00,00,00,b0,04,00,00,3c,00,00,00,32,32,00,00,04,00,00,00,05,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,78,00,00,00,08,07,00,00,58,02,00,\
  00,01,01,64,50,64,64,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\1]
"Name"="Portable/Laptop"
"Description"="This scheme is designed for extended battery life for portable computers on the road."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,\
  00,00,00,00,00,00,00,b0,04,00,00,2c,01,00,00,32,32,00,00,04,00,00,00,05,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,78,00,00,00,08,07,00,00,b4,00,00,\
  00,01,01,64,50,64,64,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\2]
"Name"="Presentation"
"Description"="This scheme keeps the monitor on for doing presentations."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,84,03,00,00,32,32,03,02,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,2c,01,00,\
  00,01,01,50,50,64,64,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\3]
"Name"="Always On"
"Description"="This scheme keeps the computer running so that it can be accessed from the network.  Use this scheme if you do not have network wakeup hardware."
"Policies"=hex:01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,2c,01,00,00,32,32,00,00,02,00,00,00,02,00,\
  00,00,01,00,00,00,14,f2,06,00,2c,01,00,00,78,00,00,00,10,0e,00,00,b4,00,00,\
  00,00,00,64,64,64,64,95,71

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\4]
"Name"="Minimal Power Management"
"Description"="This scheme keeps the computer on and optimizes it for high performance."
"Policies"=hex:01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,2c,01,00,00,32,32,03,03,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,2c,01,00,00,00,00,00,00,84,03,00,\
  00,00,01,64,64,64,64,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\5]
"Name"="Max Battery"
"Description"="This scheme is extremely aggressive for saving power."
"Policies"=hex:01,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,05,\
  00,00,00,00,00,00,00,b0,04,00,00,78,00,00,00,32,32,03,02,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,84,03,00,00,3c,00,00,00,00,00,00,00,b4,00,00,\
  00,01,01,64,32,64,64,00,00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoSaveSettings"=dword:00000000

Open in new window

then you can run the following command if you have psexec installed
psexec \\<location ip> -u <username here> –p <password here> -d -c regedit /s ,<name of reg file here>.reg
0
 

Author Closing Comment

by:bbimis
ID: 39796428
found method that worked elsewhere
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
This article will help you understand what HashTables are and how to use them in PowerShell.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now