Thursday, February 26, 2015

Retrieve latest timerjobs


To get a quick overview over latest timerruns and get rid of scrolling endlessly in Central Admin
-----getTimerJobHistories.ps1--------
Add-PSSnapin microsoft.sharepoint.powershell
$number= 10 #total results
$timername = "User Profile Service Application_LMTRepopulationJob"
$timerjob = Get-SPTimerJob $timername
$timerjob.HistoryEntries | select jobdefinitiontitle,starttime,endtime,status,errormessage -first $number|format-table
#$timerjob.HistoryEntries
------------eof---------------------

No comments: