create and manage Windows scheduled tasks entirely through the PowerShell ScheduledTasks module cmdlets

domain: learn.microsoft.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Build the action with `New-ScheduledTaskAction -Execute 'powershell.exe' -Argument '-File C:\scripts\job.ps1'`.
  2. Build one or more triggers with `New-ScheduledTaskTrigger -Daily -At 3am` (a task supports up to 48 triggers).
  3. Set the run-as context and privilege level with `New-ScheduledTaskPrincipal -UserId 'SYSTEM' -LogonType ServiceAccount -RunLevel Highest`.
  4. Combine settings (e.g. don't stop on battery) with `New-ScheduledTaskSettingsSet`, then register everything with `Register-ScheduledTask -TaskName 'Job' -Action $action -Trigger $trigger -Principal $principal -Settings $settings`.
  5. Update an existing task in place with `Set-ScheduledTask`, or remove it with `Unregister-ScheduledTask -TaskName 'Job' -Confirm:$false`.

Known gotchas

Related routes

Use PowerShell to automate application installs and configure scheduled tasks on Windows
learn.microsoft.com · 5 steps · unrated
Create and manage Windows Task Scheduler jobs from the command line using schtasks.exe
learn.microsoft.com · 5 steps · unrated
Write a PowerShell script that schedules itself as a recurring background job using Register-ScheduledJob
learn.microsoft.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans