Created
September 21, 2016 13:50
-
-
Save nicdoye/b12e4e64f7fb462bfbe287bfe8fa541f to your computer and use it in GitHub Desktop.
Reboot scheduled task for Windows 2008r2. For those with finer grained security, you could use a lower-privileged account than Administrator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-16"?> | |
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<Date>2016-09-20T11:25:05.3204</Date> | |
<Author>SOMESERVER\Administrator</Author> | |
<Description>Simple reboot task</Description> | |
</RegistrationInfo> | |
<Triggers> | |
<TimeTrigger> | |
<StartBoundary>2016-09-21T06:00:00</StartBoundary> | |
<Enabled>true</Enabled> | |
</TimeTrigger> | |
</Triggers> | |
<Principals> | |
<Principal id="Author"> | |
<UserId>SOMESERVER\Administrator</UserId> | |
<LogonType>Password</LogonType> | |
<RunLevel>HighestAvailable</RunLevel> | |
</Principal> | |
</Principals> | |
<Settings> | |
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> | |
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries> | |
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries> | |
<AllowHardTerminate>true</AllowHardTerminate> | |
<StartWhenAvailable>false</StartWhenAvailable> | |
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> | |
<IdleSettings> | |
<StopOnIdleEnd>true</StopOnIdleEnd> | |
<RestartOnIdle>false</RestartOnIdle> | |
</IdleSettings> | |
<AllowStartOnDemand>true</AllowStartOnDemand> | |
<Enabled>true</Enabled> | |
<Hidden>false</Hidden> | |
<RunOnlyIfIdle>false</RunOnlyIfIdle> | |
<WakeToRun>false</WakeToRun> | |
<ExecutionTimeLimit>PT1H</ExecutionTimeLimit> | |
<Priority>7</Priority> | |
</Settings> | |
<Actions Context="Author"> | |
<Exec> | |
<Command>C:\Windows\System32\shutdown.exe</Command> | |
<Arguments>/r /f /t 5 /c "Scheduled Reboot"</Arguments> | |
</Exec> | |
</Actions> | |
</Task> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment