ScheduledTasks module: setup and commands
Documentation: Microsoft Learn
Inspect task definitions, triggers and principals with Get-ScheduledTask, then verify execution history instead of assuming registration means success.
Getting it
Present on Windows 8 and Windows Server 2012 onward with nothing to install.
Examples
Show reference output
Show reference output
What it is for
Use it when scheduled work needs an audit, or when a task has to be created identically across a fleet of servers. Get-ScheduledTaskInfo is where last run time and last result live, and that is what failure reporting actually needs.
Typical tasks
- Find tasks whose last result was not zero
- List tasks under a specific folder path
- Read last run and next run times
- Register a task from action and trigger objects
- Change the account a task runs under
- Disable a task without deleting it
Check the installed version
Compare the module path and version with the session used by your scheduled task or automation account. Use it when scheduled work needs an audit, or when a task has to be created identically across a fleet of servers. Get-ScheduledTaskInfo is where last run time and last result live, and that is what failure reporting actually needs.