TEAM: Huntress Managed Endpoint Detection and Response (EDR)
PRODUCT: Huntress
ENVIRONMENT: Windows
SUMMARY: This article highlights the importance of rebooting a Windows system and how to easily automate this.
The Why
It's always a good idea to restart your computer, especially after an update, and Microsoft agrees! Here are some of their official resources that explain why this simple step is so important:
-
Microsoft Support Article - "Why you should restart your computer after installing Windows updates":
- This article explains that restarting is often necessary to complete the installation of updates and to ensure that all changes take effect. You can find this on the official Microsoft Support website.
-
Windows Update FAQ:
- In their FAQ, Microsoft states that some updates require a restart to finish installing, and they recommend not to postpone these restarts for too long to maintain system security and stability.
-
Microsoft Docs - "Manage updates using Windows Update for Business]
- Here, Microsoft discusses the importance of restarts for updates, especially in enterprise environments. They provide guidance on how to manage these updates to minimize disruption, including setting up restart policies.
-
Windows Security Blog:
- Various blog posts have occasionally emphasized the importance of rebooting after updates to apply security patches effectively.
-
Microsoft Tech Community Posts and Forums:
- There are numerous threads where Microsoft MVPs, support staff, and engineers have advised users to restart their systems post-updates to resolve issues or ensure updates are fully implemented.
These resources underline that rebooting after updates:
- Completes the installation of updates.
- Applies security patches.
- Resolves performance issues or anomalies that might arise during an update.
- Ensures system stability and integrity.
ESPM Required Reboots
- A reboot is required for RMM Guard blocking to take effect.
- Reboots will cause any RMM's to activate shortly after reboot, which will cause them to be detected.
-
Newly installed RMM will be detected or blocked during install. The reboot covers RMM's that were installed prior to installing Huntress.
-
How to Automate Reboots
There are several ways to maintain fleet health by regularly rebooting. One of the easiest is using Task Scheduler to schedule reboots. All of these must be run as admin.
This command will create a repeating scheduled task that reboots the machine weekly on Saturday at 3am:
schtasks /Create /TN "Weekly_Saturday_Reboot" /SC WEEKLY /D SAT /ST 03:00 /TR "shutdown.exe /r /f /t 0" /RU "NT AUTHORITY\SYSTEM" /RL HIGHEST
Alternatively if you just need one overnight reboot you can use this command, which removes the scheduled task after execution:
schtasks /Create /TN "OneTime_SelfDeleting_Reboot" /SC ONCE /ST 03:00 /TR "shutdown.exe /r /f /t 0" /RU "NT AUTHORITY\SYSTEM" /RL HIGHEST /Z
Flag Breakdown:
/TN "x" The name of the scheduled task, to make it easier to find.
/D SAT Runs daily on Saturday
/r Restart rather than shutdown
/f Forces running applications to close
/t 0 Time delay of 0 seconds before rebooting. Set to a higher value if there's any potential of the machine being in-use at the time.
/RU Run as SYSTEM account
/RL Run with highest level permissions
/Z Delete scheduled task when execution has completed