Reset Deferral Count

I’m looking to use PSADT to not install an application but check if a computer hasn’t rebooted for 35 days and if it hasn’t then it will give them 3 deferrals and then force reboot (running daily as a package in SCCM). Is there a way to reset the deferral count whenever the computer is compliant with rebooting within the 35 day period? Thanks.

I don’t use deferrals but it should reset when your package ‘installs’.

Depending on the user that runs the script the Deferrals are stored in different places, if you want to modify them with your own logic you need to update the value in the right place. Here’s some examples of where I have found the setting on a computer:
HKEY_USERS\S-1-5-18\Software\PSAppDeployToolkit\DeferHistory
HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory
HKEY_USERS.DEFAULT\Software\PSAppDeployToolkit\DeferHistory

2 Likes

Thanks. What counts as a successful install? Would “Exit-Script -ExitCode 0” work?

Thanks @JFP will look at that.

I would instead suggest Reboot Dialog. Works beautifully.