Created
November 15, 2018 17:15
-
-
Save 59uptime/d646afcd06bf53979e6394e708042398 to your computer and use it in GitHub Desktop.
Example of code
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
$action = New-ScheduledTaskAction -Execute 'Powershell.exe' -Argument ' -command "& {shutdown -s}"' | |
$trigger = New-ScheduledTaskTrigger -Daily -At 4:24pm | |
register-ScheduledTask -Action $action -Trigger $trigger -TaskName "shutdown" -Description "Shutdown computer at specific time" -user "system" -force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment