For New-GPLink parameters: msdn reference
New-GPLink -Name 'ScreenSaverTimeOut' -Target 'ou=MyOU,dc=myenterprise,dc=com'įor. Set-GPRegistryValue -Name 'ScreenSaverTimeOut' -Key 'HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop' -ValueName ScreenSaveTimeOut -Type DWord -Value 900 New-GPO -Name 'ScreenSaverTimeOut' -Comment 'Sets the time to 900 seconds' Using powershell and group policy, you can manage for which Organizational Unit / Domain / Site you're affecting the change, and it's having prevedence over user settings.Ĭhanging group policy in the case of the screen saver time out: Get-Command -Module GroupPolicy With user / domain / site awareness: group policy NB: Thoses parameters are superseeded by group policy parameters (eg., to force a screen saver for users in an enterprise). You can put these in a ScrnInstaller.ps1 script that you execute with the command: $ powershell -WindowStyle hidden -f 'ScrnInstaller.ps1' Set-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name scrnsave.exe -Value 'c:\windows\system32\mystify.scr' Set-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name ScreenSaveTimeOut -Value 60 The modern way, with powershell Set-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name ScreenSaveActive -Value 1