Uptime Reboot Policy with NinjaOne and PowerShell
· 4 min read
Long-running uptime can be useful, but it also increases risk: pending updates remain pending, patch windows get missed, and users eventually get hit with inconvenient restarts.
This script gives you a practical middle ground:
- Detect when uptime exceeds a threshold
- Notify the logged-in user with a Windows toast
- Optionally let the user schedule an earlier reboot
- Enforce a reboot deadline with a Scheduled Task
- Write policy state and user action back to NinjaOne custom fields