Reputation: 42450
running the cmd command
schtasks /query /fo LIST
Gives me a list of all scheduled tasks running on my system. Example:
HostName: CHESTNUT105B
TaskName: Calculator
Next Run Time: 12:00:00, 10/28/2010
Status: Running
HostName: CHESTNUT105B
TaskName: GoogleUpdateTaskMachineCore
Next Run Time: At logon time
Status:
HostName: CHESTNUT105B
TaskName: GoogleUpdateTaskMachineCore
Next Run Time: 13:02:00, 10/28/2010
Status:
HostName: CHESTNUT105B
TaskName: GoogleUpdateTaskMachineUA
Next Run Time: 17:02:00, 10/27/2010
Status:
How can I filter the list so it only shows me the details of the task 'Calculator' ?
the \tn argument gives me an error Invalid Argument / Option
Upvotes: 12
Views: 42520
Reputation: 143
Unfortunatly I can not add a comment to ZEE's comment (not enough "reputation").
With the /TN switch you have to use the "path" - containing the folder in the task scheduler. Or you get an error:
"ERROR: The system cannot find the file specified."
For example:
schtasks /Query /TN \Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup
(see also Jonathon Kellers Blog: http://www.jonathankeller.com/2012/02/schtasks-query-tn-tasks-over-network.html).
For better output I recommend the switch "/fo list" -> output as a list and verbose "/v":
schtasks /Query /TN \Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup /fo list /v
Upvotes: 3
Reputation: 1885
Use /
instead of \
. This works just fine.
schtasks /query /fo LIST /tn Calculator
Upvotes: 12