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

unattached content database recover contents list library

unattached content database – recover contents list library from is required while moving list or library as content migration. You can recover files from content database that is not attached to any web application in sharepoint 2019. Recovering data from content database unattached will restore only specific list library in sharepoint site. Follow the step by step procedure to recover list library from sharepoint content database not attached.

Advertisements
  • Navigate to central admin in sharepoint 2019.
  • Select “Backup and Restore” from left navigation and click on “Recover data from an unattached content database” present under “Granular backup”.
recover contents list library from unattached content database
Advertisements
  • Select “Database Server”.
  • Select “Database Name” which is unattached to any web application.
  • select the radio button “Export site or list”, if you want to export list or library from unattached content database.
  • Choose radio button “Backup site collection” to export site collection from content database unattached.
recover files from content database that is not attached
Advertisements
  • Select site collection present in the unattached content database.
  • choose site from the site collection selected above.
  • Select list or library that you want to recover or restore.
select site list library in sharepoint from contact database unattached
Advertisements

After that, follow the same procedure described in previous post “export import list library sites in sharepoint” to import list or library described once export is completed.

Import-SpWeb -Identity "site url in which you want to import list" -Path "exported item saved location" -IncludeUserSecurity -UpdateVersions Overwrite -verbose

Import-SpWeb -Identity "site url in which you want to import library" -Path "exported item saved location" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Advertisements

watch the video to get in detail step by step

Advertisements
Advertisements

export import list library sites in sharepoint

export import list library sites in sharpoint 2019 is a common task for sharepoint administrator carried out during migration. You will get requests from user to move or copy, sharepoint list, libraries, sites from one site to another site. Site may be present in different web application under different sharepoint environment(PROD, DEV, SIT). Site between different sharepoint versions (SharePoint 2010 to SharePoint 2013 or SharePoint 2013 to SharePoint 2016 or SharePoint 2019).

Advertisements

You can migrate contents from one site to another site using backup restore site collection method, if size of content is large. We already discussed how to create backup restore request and follow content database detach attach method in previous post as below.

Advertisements

Dismount Mount content database in sharepoint 2019 using powershell“. You can follow this to complete the task.

You can export list library sites to migrate contents only, size of content to be migrate is not so high. Once export is complete, you need to import list library in destination sharepoint site.

You can export import sharepoint list library using powershell or by using granular backup export a site or list method.

Advertisements

follow the command below Export-SPWeb to export sharepoint site collection

Export-SPWeb -Identity "<site collection url>" -Path "saving path"
Export-SPWeb -Identity "http://win-56r9d2tbfob:39760/sites/SharePointTechnicalSupport" -Path "C:\Backup\Site Collection\sitecollectionPS.cmp"
Advertisements

following command will export subsite in sharepoint

Export-SPWeb -Identity "subsite url" -Path "saving path" -verbose
Export-SPWeb -Identity "http://win-56r9d2tbfob:39760/sites/SharePointTechnicalSupport/SubsiteTeams" -Path "C:\Backup\SubsiteSite\SubsitePS.cmp" -verbose
Advertisements

export list in sharepoint following below command

Export-SPWeb -Identity "subsite url" -Path "saving location" -ItemUrl "list path" -IncludeUserSecurity -IncludeVersions All -verbose
Export-SPWeb -Identity "http://win-56r9d2tbfob:39760/sites/SharePointTechnicalSupport/SubsiteTeams" -Path "C:\Backup\List\List.cmp" -ItemUrl "Lists/ContactList" -IncludeUserSecurity -IncludeVersions All -verbose
Advertisements

following command will export library in sharepoint

Export-SPWeb -Identity "subsite url" -Path "saving location" -ItemUrl "library name" -IncludeUserSecurity -IncludeVersions All -verbose
Export-SPWeb -Identity "http://win-56r9d2tbfob:39760/sites/SharePointTechnicalSupport/SubsiteTeams" -Path "C:\Backup\Library\Documents.cmp" -ItemUrl "Shared Documents" -IncludeUserSecurity -IncludeVersions All -verbose
Advertisements

Import list in sharepoint following below command

Import-SpWeb -Identity "site url in which you want to import list" -Path "exported item saved location" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Import-SpWeb -Identity "http://win-56r9d2tbfob:19919/sites/SPSupport" -Path "C:\Backup\List\List.cmp" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Advertisements

following command will import library in sharepoint

Import-SpWeb -Identity "site url in which you want to import library" -Path "exported item saved location" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Import-SpWeb -Identity "http://win-56r9d2tbfob:19919/sites/SPSupport" -Path "C:\Backup\Library\Documents.cmp" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Advertisements

similarly use follow the command below to Import site in sharepoint

Import-SpWeb -Identity "http://win-56r9d2tbfob:19919/sites/SPSupport" -Path "C:\Backup\SubsiteSite\SubsitePS.cmp" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Advertisements

watch below video to get more in detail.

Advertisements