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

start stop manage services in windows server with powershell

This post is all about how to start stop manage services in windows server with powershell. We will discuss the start service powershell command, stop service powershell command, Killing Windows Service that Hangs on Stopping or Not Responding command, how to get service powershell command, how to set service startup type powershell command.

Get Service powershell command windows server

This command will display all service on computer. Default display will be status, service name, and display name each service

Get-Service
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});

Get service begin with search string

Get service begin with Display services that include search string “sp”

Get-Service "sp*" | Sort-Object status
Get service begin with Display services that include search
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});

Display services that include search string

Display services that include search string “sharepoint”

Get-Service -Displayname "*sharepoint*"
Display services that include search string
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});

Get services begin with search string and an exclusion

Get services begin with search string “sp” and an exclusion “spo”

Get-Service -Name "sp*" -Exclude "spooler","sppsvc"
Get services begin with search string and an exclusion
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});

Get object details for service

Get-Service SPAdminV4 | Select-Object *
Get service begin with Display services that include search
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});

Display services that are running

Display services with status Running

Get-Service | Where-Object {$_.Status -eq "Running"}
Display services that are running
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});

Display services that are Stopped

Display services with status “Stopped”

Get-Service | Where-Object {$_.Status -eq "Stopped"}
Display services stopped
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});

Start Service powershell command

Below command returns how to start a particular service using powershell.

Start-Service ServiceName
example: ServiceName = SPAdminV4
Start-Service SPAdminV4

Stop Service powershell command

Below command returns how to stop a particular service using powershell.

Stop-Service ServiceName
example: ServiceName = OSearch16
Stop-Service OSearch16
how to stop a particular service using powershell
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});

Disable Service powershell command

Below command returns how to disable a particular service using powershell.

Set-Service ServiceName -StartupType Disabled
or
Set-Service -Name ServiceName -StartupType Disabled
example: ServiceName = OSearch16
Set-Service -Name OSearch16 -StartupType Disabled
how to disable a particular service using powershell
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});

Start Service with status stopped

Start service whose status is stopped bu running below command.

Get-Service Wsearch | Where {$_.status –eq 'Stopped'} | Start-Service

stop start disable particular windows services with status stopped running stopping using powershell

https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8844016778182294 (adsbygoogle = window.adsbygoogle || []).push({});