Skip to content

SPManagedMetaDataServiceApp

dscbot edited this page Mar 17, 2023 · 18 revisions

SPManagedMetaDataServiceApp

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String The name of the managed metadata service application
ProxyName Write String The proxy name, if not specified will be /Name of service app/ Proxy
ApplicationPool Required String The application pool that the service app will use
DatabaseServer Write String The name of the database server which will host the application
DatabaseName Write String The name of the database for the service application
TermStoreAdministrators Write StringArray[] A list of the users/groups who are administrators of the term store
Ensure Write String Present ensures service app exists, absent ensures it is removed Present, Absent
ContentTypeHubUrl Write String The URL of the content type hub for this app (only set when the app is provisioned)
DefaultLanguage Write UInt32 The LCID of the default language (only set when the app is provisioned)
Languages Write UInt32Array[] The LCIDs of the working languages (only set when the app is provisioned)
ContentTypePushdownEnabled Write Boolean Specifies that existing instances of changed content types in subsites and libraries will be updated.
ContentTypeSyndicationEnabled Write Boolean Specifies that this connection will provide access to the content types that are associated with the managed metadata service application.
UseSQLAuthentication Write Boolean Should SQL Server authentication be used to connect to the database?
DatabaseCredentials Write PSCredential If using SQL authentication, the SQL credentials to use to connect to the instance

Description

Type: Distributed Requires CredSSP: No

Creates a managed metadata service application. The application pool property specifies which application pool it should use, and will reset the application back to this pool if it is changed after its initial provisioning. The database server and database name properties are only used during provisioning, and will not be altered as part of the ongoing operation of the set method.

The default value for the Ensure parameter is Present. When not specifying this parameter, the service application is provisioned.

The content type hub url will be set or reset.

The language settings (default and working) are only changed if they are part of the bound parameters. Otherwise they will not be altered.

ContentTypePushdownEnabled and ContentTypeSyndicationEnabled will only be altered if they are part of the bound parameters.

Examples

Example 1

This example shows how to deploy the Managed Metadata service app to the local SharePoint farm.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPManagedMetaDataServiceApp ManagedMetadataServiceApp
        {
            Name                 = "Managed Metadata Service Application"
            ApplicationPool      = "SharePoint Service Applications"
            DatabaseServer       = "SQL.contoso.local"
            DatabaseName         = "SP_ManagedMetadata"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 2

This example shows how to remove a specific managed metadata service app from the local SharePoint farm. Because Application pool parameter is required but is not acutally needed to remove the app, any text value can be supplied for these as it will be ignored.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPManagedMetaDataServiceApp ManagedMetadataServiceApp
        {
            Name                 = "Managed Metadata Service Application"
            ApplicationPool      = "none"
            Ensure               = "Absent"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 3

This example shows how to deploy the Managed Metadata service app to the local SharePoint farm and also include a specific list of users to be the term store administrators.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPManagedMetaDataServiceApp ManagedMetadataServiceApp
        {
            Name                    = "Managed Metadata Service Application"
            PsDscRunAsCredential    = $SetupAccount
            ApplicationPool         = "SharePoint Service Applications"
            DatabaseServer          = "SQL.contoso.local"
            DatabaseName            = "SP_ManagedMetadata"
            TermStoreAdministrators = @(
                "CONTOSO\user1",
                "CONTOSO\user2"
            )
        }
    }
}

Example 4

This example shows how to deploy the Managed Metadata service app to the local SharePoint farm and also include a specific list of users to be the term store administrators.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPManagedMetaDataServiceApp ManagedMetadataServiceApp
        {
            Name                    = "Managed Metadata Service Application"
            ApplicationPool         = "SharePoint Service Applications"
            DatabaseServer          = "SQL.contoso.local"
            DatabaseName            = "SP_ManagedMetadata"
            TermStoreAdministrators = @(
                "CONTOSO\user1",
                "CONTOSO\user2"
            )
            DefaultLanguage         = 1033
            Languages               = @(1031, 1033)
            PsDscRunAsCredential    = $SetupAccount
        }
    }
}

Example 5

This example shows how to deploy the Managed Metadata service app to the local SharePoint farm and also include a specific list of users to be the term store administrators.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPManagedMetaDataServiceApp ManagedMetadataServiceApp
        {
            Name                 = "Managed Metadata Service Application"
            ApplicationPool      = "SharePoint Service Applications"
            DatabaseServer       = "SQL.contoso.local"
            DatabaseName         = "SP_ManagedMetadata"
            ContentTypeHubUrl    = "http://contoso.sharepoint.com/sites/ct"
            PSDscRunAsCredential = $SetupAccount
        }
    }
}

Example 6

This example shows how to deploy the Managed Metadata service app to the local SharePoint farm and also include a specific list of users to be the term store administrators.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPManagedMetaDataServiceApp ManagedMetadataServiceApp
        {
            Name                          = "Managed Metadata Service Application"
            ApplicationPool               = "SharePoint Service Applications"
            DatabaseServer                = "SQL.contoso.local"
            DatabaseName                  = "SP_ManagedMetadata"
            ContentTypeHubUrl             = "http://contoso.sharepoint.com/sites/ct"
            ContentTypePushdownEnabled    = $true
            ContentTypeSyndicationEnabled = $true
            PSDscRunAsCredential          = $SetupAccount
        }
    }
}
Clone this wiki locally