Last active
February 1, 2024 22:26
-
-
Save rwp0/ea4cb76022dfa532fa6c7f468dc74cf2 to your computer and use it in GitHub Desktop.
schtasks: Windows Task Scheduler CLI (Shutdown)
This file contains hidden or 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
rem https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-change | |
schtasks /change /tn shutdown /st 00:00 |
This file contains hidden or 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
rem https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-create | |
schtasks /create ^ | |
/f ^ | |
/sc once ^ | |
/tn shutdown ^ | |
/tr "shutdown /s /f /t 0" ^ | |
/st 01:00 | |
rem Run once at 1 AM |
This file contains hidden or 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
rem https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-delete | |
schtasks /delete /tn shutdown /f |
This file contains hidden or 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
rem https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-query | |
schtasks /query /v /fo list /tn shutdown |
This file contains hidden or 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
rem https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-run | |
schtasks /run /tn shutdown |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment