RESTART SHAREPOINT SERVICE APPLICATION USING POWERSHELL


In this hint, I will explain How to Start and Stop (Restart) a SharePoint Service Application using PowerShell.

Scenario:

I tried to start the User Profile Synchronization Service via SharePoint Central Administration as the following:

  • Central Administration > Manage Services On Server

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.

stop-user-profile-sync-service-in-sharepoint-via-powershell

Since there is no way within Central Administration to stop the service, and in this case, I should resort to PowerShell to stop it manually.

Note: In User Profile Sync Service Stuck on ‘Starting’ article, I explained How to solve this issue,

Steps:

To Stop a SharePoint Service Application.

  • 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.

stop-spserviceinstance

  • The Service Application should be now stopped successfully.

restart-user-profile-sync-service-in-sharepoint-via-powershell

To start a SharePoint Service Application.

  • Type “Start–SPServiceInstance -identity
  • Paste the copied Application Service GUID.
Start-SPServiceInstance -identity d8c3a67b-0917-4aeb-9053-a310a40154d6

Enjoy 🙂

Ref :https://blog.devoworx.net/2012/10/30/start-stop-sharepoint-service-applications-using-powershell/

Advertisements
This entry was posted in SHAREPOINT ADMIN. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s