PowerShell | Scheduled Task Template

Simple one today.

Just a quick template on scheduled tasks. Just copy and paste to your script. Super fun happy times


$NewScheduledTaskAction = New-ScheduledTaskAction -Execute “PowerShell.exe” -Argument “-ExecutionPolicy Bypass C:\scripts\test.ps1”

$NewScheduledTaskTrigger = New-ScheduledTaskTrigger -Daily -At ‘3AM’

$NewScheduledTask = New-ScheduledTask -Action $NewScheduledTaskAction -Trigger $NewScheduledTaskTrigger

$NewScheduledTask | Register-ScheduledTask -TaskName “Script” -User “Luke” -Password “SuperSecurePassword”

Luke Keam

Luke Keam

Thank you for reading.

Any questions, comments or suggestions please leave a message below

Have a great day from

Luke Keam

Luke Keam

Latest posts by Luke Keam (see all)