$account = New-Object System.Management.Automation.PSCredential "READYLAB\sp2013_c2wts", ` (ConvertTo-SecureString "M0dewh1z" –AsPlainText –Force) $managedAccount = New-SPManagedAccount $account
Tag: service
Display Service Applications along with app-pool names and user accounts used for them.
Get-SPServiceApplication | Select Name, @{Name="SPAppPoolName"; Expression={$_.ApplicationPool.Name}}, @{Name="IISAppPoolName"; Expression={$_.ApplicationPool.Id}}, @{Name="ProcessAccountName"; Expression={$_.ApplicationPool.ProcessAccountName}}
By a minor tweak to the command – Get-SPWebApplication, you could use this for web application as well. though the process account name is not available.
Starting / Stopping User Profile Service (User Profile Synchronization Service stuck in stopping state in SharePoint 2013 farm)
Fixing a state where the user profile service complains that it is starting or stopping
Get-SPServiceInstance | Select-Object TypeName, ID
To stop this , type the GUID of User Profile Synchronization Service
Stop-SPServiceInstance -Identity 53016725-d75a-43f6-9c7a-1e50b4502faf
IISRESET on the front end servers.
If the above does not work:
$service = $(Get-SPServiceInstance | where {$_.TypeName -match "User Profile Synchronization Service" } | where {$_.Server -match "613836-SEARCH1"})
$service.Unprovision()
Note: to find the un-provisioning ones:
Get-SPServiceInstance | where {$_.Status -eq "Unprovisioning"} | Select-Object TypeName, ID
TypeName Id
——– —
User Profile Synchronization Service 53016725-d75a-43f6-9c7a-1e50b4502faf
User Profile Service 2e077c84-d260-47b0-9941-1faaff90bfb3
User Profile Synchronization Service e055ff40-cc23-4ec8-bce0-793057ca0a63
User Profile Service 14f74b42-a4a7-4cb1-9eb8-93ac90a317bd
Delete orphaned SharePoint Service Application Pool
PowerShell : Setting Managed Metadata Service Connection Properties
Select the settings for this Managed Metadata Service Connection.
[x] This service application is the default storage location for Keywords.
[x] This service application is the default storage location for column specific term sets.
[x] Consumes content types from the Content Type Gallery at http://sp2010riyaz:9090/.
[x] Push-down Content Type Publishing updates from the Content Type Gallery to sub-sites and lists using the content type.
# Get Metadata service application proxy
$metadataserviceapplicationname = "Managed Metadata Service"
$metadataserviceapplicationproxy = get-spmetadataserviceapplicationproxy $metadataserviceapplicationname
# This service application is the default storage location for Keywords.
$metadataserviceapplicationproxy.Properties["IsDefaultKeywordTaxonomy"] = $true
# This service application is the default storage location for column specific term sets.
$metadataserviceapplicationproxy.Properties["IsDefaultSiteCollectionTaxonomy"] = $true
# Consumes content types from the Content Type Gallery
$metadataserviceapplicationproxy.Properties["IsNPContentTypeSyndicationEnabled"] = $false
# Push-down Content Type Publishing updates from the Content Type Gallery
# to sub-sites and lists using the content type.
$metadataserviceapplicationproxy.Properties["IsContentTypePushdownEnabled"] = $true
$metadataserviceapplicationproxy.Update()
Service Application Properties:
Content Type hub
[x] Report syndication import errors from Site Collections using this service application.
Set-SPMetadataServiceApplication -Identity "Managed Metadata Service" -HubUri "http://sitename" -SyndicationErrorReportEnabled