The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Hi @qasimidl,
You could check SharePoint Timer Service is running on All servers, with following script we can get the status of Internal SharePoint Foundation Timer Job.
$farm = get - spfarm
$ss = $farm.Servers | ? {
$_.Role - notlike "Invalid"
}
foreach($s in $ss) {
$s.name
Write - host "........................."
$is = $s.ServiceInstances
foreach($i in $is) {
if ($i.TypeName - eq "Microsoft SharePoint Foundation Administration") {
$i.Typename
$i.status
}
if ($i.TypeName - eq "Microsoft SharePoint Foundation Timer") {
$i.Typename
$i.status
}
}
}
If Internal SharePoint Foundation Timer job instance is disabled. We can change the status via PowerShell only. Please run the below PowerShell to bring all the Service Instances Online.
$farm = Get - SPFarm
$disabledTimers = $farm.TimerService.Instances | where {
$_.Status - ne "Online"
}
if ($disabledTimers - ne $null) {
foreach($timer in $disabledTimers) {
Write - Host "Timer service instance on server "
$timer.Server.Name " is not Online. Current status:"
$timer.Status
Write - Host "Attempting to set the status of the service instance to online"
$timer.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online
$timer.Update()
}
} else {
Write - Host "All Timer Service Instances in the farm are online! No problems found"
}
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.