So I’ve been tasked with creating a script that will prompt our users to reboot if they haven’t in 7 days, and when prompted they get two options “Reboot” or “Defer - 1 Hour”. Then at the end of that 1 hour timer, it pops up again but with either the defer button gone (2nd form) or greyed out (reuse form but disable defer button?). I found a non-PSADT script that will almost do that on the technet gallery, but am hoping that PSADT will have better options.
So any help that can be offered would be massively appreciated.
The script I found, will pop up a gui after it checks how many days since the last reboot, but uses schtasks to schedule a reboot at a specific time. The user isn’t subsequently prompted again at 6 PM. My thought is to start a timer when the defer button is pressed, then when it comes back to remind them, it only has the reboot option which when clicked will immediately reboot, or after a 10 second delay or something.
Tried Coretech’s tool, but can’t limit the number of deferments (might have to convince boss this is the best option tho if I can’t figure this out by EOM). If it had the option to remove deferments, or remove them all once someone clicked postpone the first time, i’d be in business.
Here’s the script that i’ve been trying to bend to my will. If PSADT has a better option I’m so on board.