sharepoint service instance start stop stuck

How to manage sharepoint service instance using powershell ? You can manage service instance in like starting service instance, stopping service instance. If sharepoint service stuck unprovisioning or provisioning, you have to use powershell to resolve the error. You can remove delete instance mostly search service instance by getting service instance id or using get-spserviceinstance by name powershell command. Status of serivice instance will change to disabled or online after running powershell. you can unprovision duplicate service instances by identifying instance id using powershell.

Advertisements

Run below powershell command to get all services instances

Get-SPServiceInstance | Sort TypeName
sharepoint service instance id
Advertisements

powershell command to get a specific service instance below

Get-SPServiceInstance -Identity 431394e7-df13-4784-af78-719789210fdc # GUID of User Profile Service
Advertisements

start specific service instance powershell command as below

Start-SPServiceInstance -Identity 431394e7-df13-4784-af78-719789210fdc # GUID of User Profile Service
Advertisements

stop instance in sharepoint using powershell command mentioned below

Stop-SPServiceInstance -Identity 431394e7-df13-4784-af78-719789210fdc # GUID of User Profile Service
Advertisements

provision/start – service instance

you can provision or start service instance running any one of the powershell command mentioned below

Get-SPServiceInstance | Where-Object {$_.TypeName -eq "User Profile Service"} | select Status, Id

Get-SPServiceInstance | Where-Object {$_.Id -eq "431394e7-df13-4784-af78-719789210fdc"} # GUID of User Profile Service

Get-SPServiceInstance | where {$_.Status -eq "online" -and $_.TypeName -eq "User Profile Service" } | Sort TypeName | Format-Table TypeName,Id,Server
Advertisements

unprovision/stop – service instance

you can unprovision or stop sevice instance using any one of the commands below

$srvc = Get-SPServiceInstance “431394e7-df13-4784-af78-719789210fdc” # GUID of User Profile Service
$srvc.Unprovision()

$srvc = Get-SPServiceInstance -Server WIN-56R9D2TBFOB | where-object {$_.TypeName -eq “User Profile Service”}
$srvc.Unprovision()

Get-SPServiceInstance | Where-Object {$_.Id -eq "431394e7-df13-4784-af78-719789210fdc"} | Stop-SPServiceInstance | Format-Table -AutoSize # GUID of User Profile Service

Get-SPServiceInstance -Server WIN-56R9D2TBFOB | where-object {$_.TypeName -eq “User Profile Service”} | Stop-SPServiceInstance -confirm:$false > $null

You can get more details related to service application in sharepoint from the link “Service Applications in SharePoint

Advertisements

Watch the video to get step by step, more in detail

Advertisements

Service Applications in SharePoint

Service Applications in SharePoint

Service Applications in SharePoint are associated with web applications, and specific services are typically deployed as needed in a particular farm. Only deployed services are referred to as service applications. This is a huge advantage in terms of conserving resources and optimizing performance. For instance, a specific web application can be configured to use only the services it needs. The number of service applications that exist is vast, and, as third-party vendors can create their own services for SharePoint Server. A list of services includes the following:

You can set up a single service application to be shared among multiple web applications or deploy multiple instances of the same service across a farm and, in some cases, across multiple farms. Also, there is no limitation regarding the number of services that can be deployed in any single farm. A typical planning scenario requires that you either set up services to share across multiple web applications or isolate an individual service to one or a limited number of web applications. We can publish below service applications across the farm.

  • Business Data Connectivity
  • Machine Translation
  • Managed Metadata
  • User Profile
  • Search
  • Secure Store

Navigate to “Central Admin -> Application Management ->Manage Service Applications” and click on “New” from ribbon to see the list of service applications available.

Service-Applications-in-SharePoint-1300x674

you can use powershell command to get the list of  service applications

Get-SPServiceApplication | Format-Table -wrap
Service Applications in SharePoint
Get-SPServiceApplication
Get-SPServiceApplication -Identity 48fbecaa-71e4-4f1d-bdfe-bdcbc17fa061 | Format-Table -wrap
Get-SPServiceApplication-1324x186

sharepoint services 2016

For every service application there is a service associated with it which you can from central admin by navigating to “Central Admin -> Application Management -> Manage Services on Server”.

manage-services-on-server-1273x441
services-on-server-1324x870

Alternatively you can use the powershell command as below

Get-SPServiceInstance | Format-Table -wrap
Get-SPServiceInstance-873x1099
Get-SPServiceInstance | Where {$_.Status -eq "Online"} | Format-Table -wrap
Get-SPServiceInstance-formt-1154x933

Similarly we can start the service instance by running the below command.

Start-SPServiceInstance e63962e4-e1ea-4b83-a9cc-df51683e85f3

service application id service instance id in sharepoint 2019 using powershell | #sharepoint2019

service application id service instance id in sharepoint 2019 using powershell | #sharepoint2019