ORIGINALLY POSTED BY CEMETRIC HERE
NOT ALL THE CODE MAY BE IN THIS POST…PLEASE FOLLOW THE LINK TO THE ORIGINAL THREAD
Couldn’t think of a better title
I have a client who is rolling out new laptops for his users (only 35 of them), now the problem he was facing, was that his users didn’t have the rights to adjust the power settings (screen blank, hard disks sleep, standby …)
There’s no “easy” fix or way to set this with policies (hello Microsoft, knock, knock, is this thing on !) …
So with some searching I created a bat file that uses the SetACL tool, the administrator can deploy this through AD, or just run it as admin on a laptop. It gives the local security group “users” the necessary rights to adjust settings. (This can be adjusted as per needs).
Here’s the code:
- Code: Select all
setacl.exe -on "\\%computername%\HKLM\SOFTWARE\MICROSOFT\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy" -ot reg -actn ace -ace "n:%computername%\users;p:full"
setacl.exe -on "\\%computername%\HKLM\SOFTWARE\MICROSOFT\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies" -ot reg -actn ace -ace "n:%computername%\users;p:full"
setacl.exe -on "\\%computername%\HKLM\SOFTWARE\MICROSOFT\Windows\CurrentVersion\Controls Folder\PowerCfg" -ot reg -actn ace -ace "n:%computername%\users;p:full"
Put the 3 lines on a seperate line in your bat file …
SetACL can be found HERE