How do you pull a list of all scheduled jobs in Windows 2012 Server Task Scheduler?
Asked Answered
C

1

5

I've been tasked with running a daily report that looks at all our jobs scheduled to run on that day, and checks to see if they have successfully ran or not. For now we are running on Windows 2008 Server, and have our jobs scheduled through the Task Scheduler. I'm definitely not a Windows developer, so I'm wondering if it is possible to pull the information I'm looking for through PowerShell or some other tool?

Clingy answered 12/10, 2016 at 23:40 Comment(0)
C
13

Try the following PowerShell command for scheduled tasks

   Get-ScheduledTask | Get-ScheduledTaskInfo

This will give you the information like when was the last time a task was run and what was the output etc. To make it look more organised or to select only information you require you can do the following:

  Get-ScheduledTask | Get-ScheduledTaskInfo | Select TaskName,TaskPath,LastRunTime,LastTaskResult
Cranage answered 12/10, 2016 at 23:55 Comment(2)
Just to save some folks some time: Get-ScheduledTask is a PS 6 cmdlet. I think the best the O.P. could do is install PS 5 on his win server 2012 machineSpringclean
here good post about this: blogs.technet.microsoft.com/heyscriptingguy/2015/01/17/…Gauntlett

© 2022 - 2024 — McMap. All rights reserved.