5

in Application Management -> Manage Service Applications -> Managed Metadata Service. Select manage metadata service and click properties. In properties window, I have added Site collection URL for content type hub and have tested the content types across multiple sites. But now I want to change Site collection URL for content type hub. How I change this?

2 Answers 2

6

You can change it via PowerShell. See this article (Link Dead, 2019): http://www.sharepointanalysthq.com/2010/11/how-to-change-the-content-type-hub-url/

Archived Link : http://web.archive.org/web/20110119230901/http://www.sharepointanalysthq.com/2010/11/how-to-change-the-content-type-hub-url/

They basically show how to use this cmdlet:

Set-SPMetadataServiceApplication -Identity "<ServiceApplication>" -HubURI "<HubURI>"
2
2

I have this little powershell function you can try it out...

function SetManagedMetadaService
{
    Param(
            [parameter(Mandatory=$true)][string]$ServiceName,
            [parameter(Mandatory=$true)][string]$HubSiteUrl
        )

        Write-Host "Setting contenttype hub Url"

        #Get-SPServiceApplication | ForEach-Object {
        #   if ($_.TypeName -eq $ServiceName) { $MetadataInstance = $_ }
        #}

        $MetadataInstance = Get-SPServiceApplication -Name "Managed Metadata Service"

        Set-SPMetadataServiceApplication -Identity $MetadataInstance -HubURI $hubSiteUrl

        Write-Host -f yellow "Setting Proxy Metadata Service Options"

        # Get Metadata service application proxy  
        $metadataserviceapplicationproxy = get-spmetadataserviceapplicationproxy $ServiceName 

        # 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"] = $true 

        # 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()       

}

And, remember to load the sharepoint snap in...

$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
 if ($snapin -eq $null)
 {
     Write-Host "Loading SharePoint Powershell Snapin"
     Add-PSSnapin "Microsoft.SharePoint.Powershell"
 }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.