win_ansible_role_obs_setup/files/disable-screensaver.ps1
2022-02-13 04:43:09 +01:00

4 lines
198 B
PowerShell

Write-Host "Disabling Screensaver"
Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord
& powercfg -x -monitor-timeout-ac 0
& powercfg -x -monitor-timeout-dc 0