Intune Remediation · Prompts the user when uptime hits 7 days
Nothing reboots on its own. The user gets a popup and reboots on their own schedule, so nobody loses work. Detection exits 1 to trigger remediation, 0 to stay put.
Detection Script
D
Detect uptime of 7 days or more detection
Exits 1 (non-compliant) to trigger remediation. Exits 0 if clean.
Runs only when detection exits 1. Nothing is forced, the user reboots when ready.
›
(New-Object -ComObject Wscript.Shell).Popup("Your device needs a reboot. Please make sure everything is saved and reboot at your earliest convenience.", 900, "Reboot required", 0+48) > $null
exit 0
The popup dismisses itself after 15 minutes if nobody clicks OK. Detection keeps flagging the device on every run until it actually reboots, so the reminder comes back daily.
Intune Remediation Settings
Run this script using the logged on credentialsYes