Restart SharePoint Timer Service Remotely using PowerShell

SharePoint Timer service must be restarted for certain configuration changes in SharePoint administration activities. To restart timer service in SharePoint, follow these steps:

  • Login to your SharePoint Web Front End Server(s)
  • Open Services console ( Start >> Run >> Services.msc)
  • From the “Services” console, Find “SharePoint Timer Service”. Right-click and choose “Restart” from the Menu.
    restart sharepoint timer service using powershell

Restart SharePoint Timer Service using PowerShell:

Well, without logging in to each and every SharePoint server and restarting the timer service, we can utilize PowerShell to do it remotely! Use:

Restart-Service sptimerv4

PowerShell Script to Restart SharePoint Timer Service Remotely:

 #Service to Restart
 $ServiceName = "SPTimerV4"

 #Array to Hold server Names. Update this Array accordingly
 $ServerNames = @("SPServer01", "SPServer02", "SPServer03")
 
 #Get All SharePoint Servers and restart their SharePoint Timer service
 foreach($Server in $ServerNames) 
 {
     Restart-Service -InputObject $(Get-Service -Computer $Server -Name $ServiceName)
 }

How to restart the timer service using WMI method?
You can also use the classic WMI method to restart any service on the remove server:

#Server Name
$ServerName = "SPServer01"
 
#Service to Restart
$ServiceName = "SPTimerV4"
 
#Get Timer Service
$Service = Get-WmiObject -computer $ServerName Win32_Service -Filter "Name='$ServiceName'"
$Service.InvokeMethod('StopService',$Null)
start-sleep -s 5
$Service.InvokeMethod('StartService',$Null)
start-sleep -s 5

Restart SharePoint Timer Service on all servers:
To restart timer service on all servers using PowerShell,

#Get the Farm
$Farm = Get-SPFarm

#Get all Timer Job instances and restart
$Farm.TimerService.Instances | foreach { $_.Stop(); $_.Start(); }

Restart SharePoint Timer Service from command-line:

From the command prompt, Enter:

net stop SPTimerV4
net start SPTimerV4

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

Leave a Reply

Your email address will not be published. Required fields are marked *