Create Scheduled Tasks From PowerShell

Define actions, triggers and settings for a Windows scheduled task.

WindowssystemautomationadminpowershellLow risk
Run Register-ScheduledTask with New-ScheduledTaskAction and New-ScheduledTaskTrigger to create a task.

01Command

Command
$ Register-ScheduledTask -TaskName Backup -Action (New-ScheduledTaskAction -Execute 'powershell.exe' -Argument '-File C:\backup.ps1') -Trigger (New-ScheduledTaskTrigger -Daily -At 3am)

02What it does

Building a task from action and trigger objects makes it repeatable and reviewable, so the same definition can be deployed to many servers or stored in source control. Doing this in the Task Scheduler GUI per machine is slow and error-prone, which is the terminal advantage here.

03Risk

RiskLow risk
RequirementsRun PowerShell as Administrator
!Warning: The task runs with the account you specify; use a dedicated service account and least privilege, and test the action manually first.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Register-ScheduledTask
    Microsoft Learn · vendor-doc · 2026-09-20
    Evidence: Creates a scheduled task and its actions and triggers.

Last verified: 2026-10-13 · Category: System & Settings

06Related solutions