How to Export Timer jobs in specific time range ?

Run following command by specifying the start time and end time as per the need 🙂

All Timer Jobs :

Get-SPTimerJob | % { $_.HistoryEntries } | Where-Object {($_.StartTime –gt “MM/DD/YYYY hh:mm:ss”) -and ($_.EndTime -lt “MM/DD/YYYY hh:mm:ss”) } | Export-Csv “C:\TimerJobs.csv” –NoType

Failed Timer Jobs:

Get-SPTimerJob | % { $_.HistoryEntries } | Where-Object {($_.StartTime -gt “MM/DD/YYYY hh:mm:ss”) -and ($_.To -lt “MM/DD/YYYY hh:mm:ss”) -and ($_.Status -ne ‘Succeeded’)} | Export-Csv “C:\FailedTimerJobs.csv” –NoType

 

Happy SharePoint Running 🙂

Dipti Chhatrapati

Dipti Chhatrapati is a passionate and ambitious SharePoint & Office 365 specialist, including technologies that are or will be directly interacting with SharePoint technology stack. She currently holds a position of manager as SharePoint/Office 365 Architect in Capgemini, Mumbai.

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz
Social Network Widget by Acurax Small Business Website Designers
Visit Us On TwitterVisit Us On FacebookVisit Us On Linkedin