1.You could use following PowerShell to get status of all timer jobs.
Get-SPTimerJob -Identity <SPTimerJobPipeBind> | Format-Table DisplayName,Id,LastRunTime,Status
Reference:
https://learn.microsoft.com/en-us/sharepoint/administration/view-timer-job-status
2.You could use following example PowerShell to get timer job history for a specific timer job.
# Variables
$StartTime = “02/06/2023 01:00:00 AM” # mm/dd/yyyy hh:mm:ss
$EndTime = “02/06/2023 01:30:00 AM”
$TimerJobName = “Immediate Alerts” # replace it with the timer job name you want
#To Get Yesterday’s use:
#$StartDateTime = (Get-Date).AddDays(-1).ToString(‘MM-dd-yyyy’) + ” 00:00:00″
#$EndDateTime = (Get-Date).AddDays(-1).ToString(‘MM-dd-yyyy’) + ” 23:59:59″
#Get the specific Timer job
$Timerjob = Get-SPTimerJob | where { $_.DisplayName -eq $TimerJobName }
#Get all timer job history from the web application$Results = $Timerjob.HistoryEntries |where { ($_.StartTime -ge $StartTime) -and ($_.EndTime -le $EndTime) } |Select WebApplicationName,ServerName,Status,StartTime,EndTime
#Send results to CSV$Results | export-csv -Path <Path of the file> -NoTypeInformation
References:
https://vschamarti.wordpress.com/2020/07/27/get-sharepoint-timer-job-history-using-powershell/
https://www.sharepointdiary.com/2015/09/get-timer-job-history-using-powershell.html
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.