I would like to use the powercfg tool in Windows to duplicate my current power scheme and then change the new scheme (enabling me to revert back to the old scheme if I mess something up) using a batch file.
I know that powercfg -getactivescheme
would return the current scheme's GUID
powercfg -setactive [GUID]
would set a GUID to the current scheme, but how would I know what GUID to use? That is, how would I know what the duplicated scheme's new GUID would be?
Executing
powercfg -l
on my machine returns the following:Then when you duplicate the current active scheme with
powercfg -duplicatescheme 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
the output is as follows:Seems to me that capturing
tokens=4
from thepowercfg -duplicatescheme
command would get you your backup scheme's GUID.