In this hint, I will explain How to
Start and Stop (Restart) a SharePoint Service Application using PowerShell.
I tried to start the User Profile Synchronization Service via SharePoint Central Administration as the following:
- Central Administration > Manage Services On Server
- Beside User Profile Synchronization Service > I clicked Start.
The service status is changed from Stopped to “Starting” and after 20 minutes the status is still “Starting” and then stuck as shown below.
As there is no way within Central Administration to stop the service, and in this case, I should resort to PowerShell to stop it manually.
Stop SharePoint Service Application Using PowerShell
- Open SharePoint Management Shell as administrator.
- Type “Get-SPServiceInstance“ to list all Application Services along with its status and ID (GUID)).
- Right-click inside the PowerShell window and select “Mark” to mark the corresponding ID of the SharePoint Service Application that you need to stop it> hit enter to copy it.
- 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 command > Type Y to confirm.
- The Service Application should be now stopped successfully.
Start SharePoint Service Application Using PowerShell
- Type “Start–SPServiceInstance -identity“
- Paste the copied Application Service GUID.
Start-SPServiceInstance -identity d8c3a67b-0917-4aeb-9053-a310a40154d6
- SharePoint 2016.
- SharePoint 2013.
- SharePoint 2010.