K1000 and Windows 7 Power Management Script
I ran the Power Management Configuration Wizard to setup a custom power plan for Windows 7 machines. The script runs and creates the plan but fails to switch the active plan to it. What can I do to make the Custom Kace plan active across the machines I am testing this on?
Answers (4)
I had the same problem. I had to create a second script that set the created power configuration as the active one.
I used these commands (see link) to find the GUID for the power configuration. Once I found the GUID I checked it on several different computers and found that it didn't vary from computer to computer. I would assume this would be the same for you, but you should probably check and make sure.
Once I found the GUID I just made a script that ran the command to set it as active (see link again). Hope this helps.
http://technet.microsoft.com/en-us/magazine/ff700230.aspx
I would check the script and verify that it has lines for IMPORT and for SETACTIVE. Here's a batch file I use (during a Win7 scripted install) that imports a previously created custom power plan and makes it the active plan, for reference:
POWERCFG -IMPORT C:\KACE\Applications\98\win7.pow 00000000-0000-0000-0100-000000000000
POWERCFG -SETACTIVE 00000000-0000-0000-0100-000000000000
One other thing to mention is that I had mixed results with trying to replace (overwrite) an existing power scheme using this method. I found creating a new scheme (i.e. using a completely different ID number) and setting it active to be consistently successful.
A final thing to try (if you haven't done so already) is to play with what account the script is running under - sometimes a script that is failing when running as system does just fine running as the current user (and for something like this, it shouldn't matter who it runs as, as long as the account has local admin rights).
John