disable-screensaver.ps1 198 Bytes
Newer Older
Stefan Scherer's avatar
Stefan Scherer committed
1
2
3
4
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