One of my team members was trying to find all the scheduled tasks from a Windows system. You can achieve this using PowerShell. In this tutorial, I will explain how to list scheduled tasks with PowerShell. With this, I will demonstrate how to utilize PowerShell to list, filter, and manage scheduled tasks.
List Scheduled Tasks with PowerShell
Here are a few methods to list scheduled tasks with PowerShell.
Method 1: List All Scheduled Tasks on a Local Computer
The most direct way to list all scheduled tasks is by using the Get-ScheduledTask cmdlet. This command queries the Windows Task Scheduler and returns a list of all registered tasks.
Get-ScheduledTaskThis output provides the task name, path, and state. It’s perfect for a high-level overview of what’s scheduled on your local machine. I use this daily to spot unexpected or legacy tasks that need cleanup.
Filter Tasks by State
Sometimes, you only care about tasks that are currently running or disabled. PowerShell makes it easy to filter by state using the Where-Object cmdlet.
Get-ScheduledTask | Where-Object State -eq "Running"This command lists only the tasks that are actively running. I recommend this approach during incident response, when you need to know what’s executing right now.
Check out Check Who Modified a File Last in Windows Using PowerShell
Method 2: Get Detailed Information About a Scheduled Task
If you want more than just the task names—such as last run time, next run time, or the result of the last execution—combine Get-ScheduledTask with Get-ScheduledTaskInfo.
Get-ScheduledTask -TaskName "Backup-USA" | Get-ScheduledTaskInfoThis gives you a detailed snapshot of the selected task, including status and run history. It’s especially useful for verifying critical jobs, like nightly SQL backups.
Listing All Tasks with Their Status and Next Run Time
To generate a report of all tasks with their status and next scheduled run, you can use a loop:
Get-ScheduledTask | ForEach-Object {
$info = Get-ScheduledTaskInfo -TaskName $_.TaskName -TaskPath $_.TaskPath
[PSCustomObject]@{
TaskName = $_.TaskName
State = $_.State
LastRunTime = $info.LastRunTime
NextRunTime = $info.NextRunTime
LastTaskResult = $info.LastTaskResult
}
} | Format-Table -AutoSizeThis script gives you a comprehensive overview, ideal for compliance reporting or regular health checks.
Check out Delete User Profiles Using PowerShell in Windows 11
Method 3: List Scheduled Tasks on a Remote Computer
Managing a fleet of machines in different states? PowerShell lets you query scheduled tasks remotely using the -ComputerName parameter.
Get-ScheduledTask -ComputerName "Houston-Server1"You’ll need administrative rights and the right firewall settings, but this is invaluable for centralized administration. I often use this to audit scheduled jobs across multiple branch offices.
Querying Multiple Computers
For larger environments, you can loop through a list of computer names:
$computers = @("NYC-Server1", "LA-Server2", "Chicago-Server3")
foreach ($computer in $computers) {
Get-ScheduledTask -ComputerName $computer | Select-Object TaskName, State
}This approach streamlines audits and helps you catch discrepancies between sites.
Read Track User Login History on Windows Using PowerShell
Method 4: Export Scheduled Task List to CSV
For documentation or compliance, exporting your scheduled tasks to a CSV file is a must. PowerShell makes this simple:
Get-ScheduledTask | Select-Object TaskName, State, TaskPath | Export-Csv -Path "C:\Reports\ScheduledTasks-USA.csv" -NoTypeInformationThis command creates a CSV file that you can share with your team or import into Excel for further analysis.
Method 5: Get Scheduled Task Actions and Triggers
Understanding what each task actually does is critical. You can retrieve the actions (e.g., the program that runs) and triggers (e.g., when it runs) using these commands:
Get-ScheduledTask | ForEach-Object {
$_.Actions
$_.Triggers
}This helps you quickly identify tasks that launch scripts, run updates, or perform backups, ensuring nothing slips through the cracks.
Conclusion
PowerShell is my go-to tool for managing and auditing scheduled tasks across any Windows environment. With just a few commands, you can list, filter, and export task information—saving time and reducing errors.
In this tutorial, I explained how to list scheduled tasks using PowerShell. Do let me know if this tutorial helps you.
You may also like the following tutorial:
- Set the Default Printer Using PowerShell in Windows
- Set Password for Local User in Windows 11 Using PowerShell
- How to Set the Time Zone Using PowerShell in Windows
Bijay Kumar is an esteemed author and the mind behind PowerShellFAQs.com, where he shares his extensive knowledge and expertise in PowerShell, with a particular focus on SharePoint projects. Recognized for his contributions to the tech community, Bijay has been honored with the prestigious Microsoft MVP award. With over 15 years of experience in the software industry, he has a rich professional background, having worked with industry giants such as HP and TCS. His insights and guidance have made him a respected figure in the world of software development and administration. Read more.