In this post, we’re going to explain how to Start and Stop SharePoint Service Application using PowerShell.
You might also like to read SharePoint User Profile Synchronization Service Stuck on Starting
In my scenario, I tried to start the User Profile Synchronization Service in SharePoint Central Administration. so I went through the following:
- Central Administration > Manage Services On Server
- Besides User Profile Synchronization Service > I clicked Start.
- The SharePoint service status is changed from “Stopped” to “Starting” and after 20 minutes the status is still stuck on “Starting” as shown below:
Unfortunately, I can’t find any way to stop the stuck service from the SharePoint Central Administration, therefore, I should resort to PowerShell to stop the SharePoint Service manually.
To restart a SharePoint Service Application using PowerShell, you should first Get SharePoint Service Application GUID that you would like to restart it.
Steps
- Login with Farm Admin or Farm account to the SharePoint Application Server that host the Central Administration.
- Open SharePoint Management Shell as an administrator.
- Run the “Get-SPServiceInstance“ cmdlet to list all Application Services along with its status and ID (GUID)).
- If you have multiple App servers cross the farm, you could specify which server you need to stop or restart the service on it.
Note: The User Profile Sync Service must be started on only one server cross the farm.
- Alternatively, You can also filter by the Type name of the Application service as the following
Get-SPServiceInstance | where-object {$_.TypeName -eq "User Profile Synchronization Service"} | select id,server,status
- Right-click inside the PowerShell window and select “Mark” to mark the corresponding ID of the SharePoint Service Application that you need to stop.
- Hit enter or right-click to copy the SharePoint Service GUID.
- Type “Stop-SPServiceInstance -identity“.
- Right-click inside the PowerShell Shell and select “paste”.
- Your cmdlet should look like:
Stop-SPServiceInstance -identity d8c3a67b-0917-4aeb-9053-a310a40154d6
- Hit enter to execute the ” Stop-SPServiceInstance ” cmdlet > Type ‘Y’ to confirm.
- Go back to Central Administration > “Manage Services on server”.
- Check the ” User Profile Sync Service” status that would be stopped successfully now.
- Run the “Start–SPServiceInstance -identity” cmdlet.
- Paste the copied Application Service GUID.
Start-SPServiceInstance -identity d8c3a67b-0917-4aeb-9053-a310a40154d6
Start User Profile Synchronization Service
If you are going to start SharePoint Application Service like User Profile Synchronization Service, So it’s preferred to use Central Administration UI to be able to reenter the password of the service account during start.
Note: In case, you are going to start the UPS service using PowerShell, you should make sure that the current login user to the server is a farm account and it’s added to the local administrator group.
For more details, Please, check User Profile Synchronization Service Prerequisites
Steps
- Login to the current server with a farm account.
- Start Central Administration as Administrator.
- Go to “Services on Server” below “System Settings”.
- Click Start on “User profile Sync Service”.
- Provide the credentials of the assigned service Account.
- Wait from 5 to 15 Minutes, and the User Profile Sync Service status should be started.
You may also like to check User Profile Synchronization Service Starting then Stopped in SharePoint.
It’s recommended to use command prompt to stop or start SharePoint Timer Service by doing the following:
Steps
- Using a farm account, run Command Prompt as Administrator.
- Run the below cmdlet to Start SharePoint Timer Service.
net start sptimerv4
If the SharePoint Timer Service is already started, try to restart it by doing the following:
Steps
- Using a farm account, run Command Prompt as Administrator.
- Run the below cmdlet to Stop SharePoint Timer Service.
net stop sptimerv4
- Then run the below cmdlet to Start SharePoint Timer Service.
net start sptimerv4
Conclusion
In conclusion, we have learned How to (Restart) Start and Stop SharePoint Service Application using PowerShell, also we have discussed how to
- Get SharePoint Service Application GUID Using PowerShell.
- Restart SharePoint Timer Service From Command-Line.
Applies To
- SharePoint 2016.
- SharePoint 2013.
You might also like to read
- User Profile Sync Service Stuck on ‘Starting’
- User Profile Synchronization Service Starting then Stopped in SharePoint
- SharePoint 2019: Service Accounts Recommendations
Have a Question?
If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.
Pingback: This User Profile Application's connection is currently not available | SPGeeks
Wonderful website. A lot of helpful info here. I’m sending
it to a few friends ans also sharing in delicious.
And of course, thanks in your effort!
Fantastic, this article has all things in fine detail.