I'm writing a script that does some basic set up of computers that come into my office before sending them out for deployment. One of the setting changes that I'm having trouble with is the timing on screen dimming for laptops. I found this function somewhere on the Hey scripting guy forum to return all the guid's in the currently active power scheme.
I don't know how the regular expression above works but I can see that it does because
powercfg -query $planGuid
returns a complete list of power settings for the currently active scheme. Thanks Scripting Guy! What I'm trying to do is pull one particular setting from the list and change the time frame for dimming the screen when under battery power, and ac power. Piping that command to Get-Member tells me that the only property I can select is length so I'm not sure how to isolate the particular setting I need, which is "dim display after".
Basically here is how I change the other power settings.