Is it possible to get an output of the failed timer jobs in the Central Admin via powershell
Is it possible to get an output of the failed timer jobs in the Central Admin via powershell
Is it possible to get an output of the failed timer jobs in the Central Admin via powershell? If yes, could anybody please share the script?
How about this then ;-)
$f = get-spfarm
$ts = $f.TimerService
#Display all jobs that haven't succeeded (I.e. Paused)
$ts.JobHistoryEntries | ?{$_.Status -ne "Succeeded"} | Ft JobDefinitionTitle,Status
#Display only failed jobs
$ts.JobHistoryEntries | ?{$_.Status -eq "Failed"} | Ft JobDefinitionTitle,Status
#Display more information
$ts.JobHistoryEntries | ?{$_.Status -eq "Failed"} | fl
I've uploaded a script to the Technet Gallery that exports the information to a CSV file. The WebApplication appears to always be empty in the history list, so I've omittd it from the script).
The link to it is here: http-://gallery.technet.microsoft.-com/sharepoint/Export-Failed-Timer-Jobs-ee69a53d