Forum Discussion

AB21805's avatar
AB21805
Bronze Contributor
Jul 10, 2023

Unable to change screensaver active to 0 via powershell - intune

Hi all,

I have used this locally on a device which works :

$RegistryPath = "HKCU:\Control Panel\Desktop"

$RegistryName = "screensaveactive"

$NewValue = "0"

Set-ItemProperty -Path $RegistryPath -Name $RegistryName -Value $NewValue

However when I run this via intune even tho the script succeeds it doesnt change to 0?

Where am I going wrong? How do I get it to work?

  • I added the script to my tenant and deployed it to my user, and the value was changed to 0. I changed it to your value (320), changed the script (Changed the log file name), and uploaded it again to Intune. The script ran on my client, and the value is back to 0. It just works... Not sure what is happening to your machine... Do you have a Configuration Profile which sets the ScreenSaver time-out? You have to exclude the group that you use for this script on that Configuration Profile

Resources