Schedules a reboot via Task Scheduler
This script uses a powershell script to schedule a reboot task via task scheduler. I find this helpful if you want to avoid issues with Kaseya server maintenance but still need machines to reboot during your maintenance window.
Schedule Reboot via Task Scheduler has no reviews.
I made a slight modification to the Powershell script so that the system reboots.
1. Updated with additional line in ScheduledReboot.ps1
" $principal = New-ScheduledTaskPrincipal -UserID "NT AUTHORITY\SYSTEM" -LogonType ServiceAccount -RunLevel Highest"
2. Added "-Principal $principal" to the Register-ScheduledTask line.
3. Now reboots occur as the scheduled task would not run as no user logged in error.