@ -34,8 +34,19 @@ if ($env:computername -ne $computername) {
Enable-UAC
Enable-UAC
# Power profile
# Power profile
## Set to maximum performances
## Set power plan to high performances
powercfg / s scheme_min
powercfg / setactive scheme_min
## Do not sleep when lid is closed
## Unhide "Lid close action" in plan advanced power settings
powercfg / setacvalueindex scheme_min sub_buttons lidaction 0
powercfg -attributes sub_buttons lidaction -attrib_hide
powercfg / setdcvalueindex scheme_min sub_buttons lidaction 0
## Unhide "Power button action" in plan advanced power settings
powercfg -attributes sub_buttons pbuttonaction -attrib_hide
## Do not sleep when lid is closed. This will not change the value in "Control Panel\Hardware and Sound\Power Options\System Settings", but it will still work.
powercfg / setacvalueindex scheme_current sub_buttons lidaction 0
powercfg / setdcvalueindex scheme_current sub_buttons lidaction 0
## Do not sleep when power button is pressed. This will not change the value in "Control Panel\Hardware and Sound\Power Options\System Settings", but it will still work.
powercfg / setacvalueindex scheme_current sub_buttons pbuttonaction 0
powercfg / setdcvalueindex scheme_current sub_buttons pbuttonaction 0
# Turn off display after 30 minutes of inactivity on AC
powercfg / setacvalueindex scheme_current sub_video videoidle 1800
# Re-activate current scheme to make settings take effect immediately
powercfg / setactive scheme_current