win_ansible_role_obs_setup/files/disable-screensaver.ps1

5 lines
198 B
PowerShell
Raw Normal View History

2022-02-13 04:43:09 +01:00
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