Skip to content

Instantly share code, notes, and snippets.

@K-Mistele
Created June 23, 2021 21:24
Show Gist options
  • Save K-Mistele/3188135440b86ad9252a30e6f88c026e to your computer and use it in GitHub Desktop.
Save K-Mistele/3188135440b86ad9252a30e6f88c026e to your computer and use it in GitHub Desktop.
powershell -ExecutionPolicy bypass "$action=New-ScheduledTaskAction -Execute 'C:\path\to\script.ps1';$trigger=New-ScheduledTaskTrigger -Once -At 'MM/DD/YYYY HH:MM:SS PM'; Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'Launch' -User 'DOMAIN\username'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment