Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. $farm = Get-SPFarm
  2. $disabledTimers = $farm.TimerService.Instances | where {$_.Status -ne "Online"}
  3. if ($disabledTimers -ne $null)
  4. {
  5. foreach ($timer in $disabledTimers)
  6. {
  7. Write-Host "Timer service instance on server " $timer.Server.Name " is not Online. Current status:" $timer.Status
  8. Write-Host "Attempting to set the status of the service instance to online"
  9. $timer.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online
  10. $timer.Update()
  11. }
  12. }
  13. else
  14. {
  15. Write-Host "All Timer Service Instances in the farm are online! No problems found"
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement