Created
April 18, 2017 00:48
-
-
Save bonjin6770/d55be25982530dead19a68f58efc66fe to your computer and use it in GitHub Desktop.
Register ScheduledTask by PowerShell Script
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
# タスクスケジューラにタスクを登録します。 | |
# Register ScheduledTask | |
# friday,sunday, AP3:00 | |
$Trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday,Friday -At "03:00:00" | |
# execute sample.exe | |
$Action = New-SCheduledTaskAction -Execute "D:\sample.exe" | |
Register-ScheduledTask -TaskPath "\Sample" -TaskName "test" -User "SYSTEM" -RunLevel Highest -Trigger $Trigger -Action $Action |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment