I have a scheduled task that runs once a week which performs a simple reboot of the machine. The problem is that once the system is rebooted, it thinks that the last shutdown was unexpected and then it asks me to specify a reason for it.
This is the command that the Task Scheduler runs:
C:\Windows\System32\shutdown.exe /r /f /t 01 /d P:4:1
As you can see, I specified the
d parameter to tell the system that the reason for the shutdown is "Application: Maintenance (Planned)". The OS in question is Windows Server 2008 R2 Standard.
Interesting enough is that I used to have the exact same task on a different machine running Windows Server 2003 and I wasn't experiencing this issue.
Turning off the Shutdown Event Tracker is not an option.