Share via


Set-SPMetadataServiceApplication

Sets the properties of a managed metadata service application.

Syntax

NoQuota

Set-SPMetadataServiceApplication
    [-Identity] <SPMetadataServiceCmdletPipeBind>
    [-AdministratorAccount <String>]
    [-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>]
    [-AssignmentCollection <SPAssignmentCollection>]
    [-CacheTimeCheckInterval <Int32>]
    [-Confirm]
    [-DatabaseCredentials <PSCredential>]
    [-DatabaseName <String>]
    [-DatabaseServer <String>]
    [-DoNotUnpublishAllPackages]
    [-FailoverDatabaseServer <String>]
    [-FullAccessAccount <String>]
    [-Name <String>]
    [-RestrictedAccount <String>]
    [-SyndicationErrorReportEnabled]
    [-HubUri <String>]
    [-MaxChannelCache <Int32>]
    [-ReadAccessAccount <String>]
    [-WhatIf]
    [-DisablePartitionQuota]
    [<CommonParameters>]

Quota

Set-SPMetadataServiceApplication
    [-Identity] <SPMetadataServiceCmdletPipeBind>
    -GroupsPerPartition <Int32>
    -LabelsPerPartition <Int32>
    -PropertiesPerPartition <Int32>
    -TermSetsPerPartition <Int32>
    -TermsPerPartition <Int32>
    [-AdministratorAccount <String>]
    [-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>]
    [-AssignmentCollection <SPAssignmentCollection>]
    [-CacheTimeCheckInterval <Int32>]
    [-Confirm]
    [-DatabaseCredentials <PSCredential>]
    [-DatabaseName <String>]
    [-DatabaseServer <String>]
    [-DoNotUnpublishAllPackages]
    [-FailoverDatabaseServer <String>]
    [-FullAccessAccount <String>]
    [-Name <String>]
    [-RestrictedAccount <String>]
    [-SyndicationErrorReportEnabled]
    [-HubUri <String>]
    [-MaxChannelCache <Int32>]
    [-ReadAccessAccount <String>]
    [-WhatIf]
    [<CommonParameters>]

Description

Use the Set-SPMetadataServiceApplication cmdlet to set the properties of a managed metadata service application.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples

EXAMPLE 1

$sa = Get-SPMetadataServiceApplication -Identity 'Managed Metadata Service Application'
Set-SPMetadataServiceApplication -Identity $sa -HubUri 'https://sitename' -SyndicationErrorReportEnabled

This example adds a content type hub to an existing managed metadata service application. It also enables error reporting when content types are imported.

EXAMPLE 2

$sa = Get-SPMetadataServiceApplication -Identity 'Managed Metadata Service Application'
Set-SPMetadataServiceApplication -Identity $sa -AdministratorAccount 'contoso\username1' -FullAccessAccount 'contoso\AppPoolAccount1,contoso\AppPoolAccount2' -RestrictedAccount 'contoso\AppPoolAccount3,contoso\AppPoolAccount4,contoso\AppPoolAccount5' -ReadAccessAccount 'contoso\AppPoolAccount6'

This example sets permissions on an existing managed metadata service application.

If you use Windows PowerShell to set any of the account values, you should set all of them. The Set-SPMetadataServiceApplication cmdlet first erases all accounts, then adds the accounts that you specified.

Parameters

-AdministratorAccount

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

A comma-separated list of user accounts or service accounts in the format <domain>\<account> that may create and run the service application. The accounts must already exist.

If a value is set by using this parameter, any existing values for the FullAccessAccount, ReadAccessAccount and RestrictedAccount parameters are removed. Consider setting all four parameters at the same time.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ApplicationPool

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies an existing IIS application pool in which to run the Web service for the managed metadata service application.

The value must be a GUID that is the identity of an SPServiceApplicationPool object; the name of an existing application pool; or an instance of a valid SPServiceApplicationPool object.

Parameter properties

Type:SPIisWebServiceApplicationPoolPipeBind
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-AssignmentCollection

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Parameter properties

Type:SPAssignmentCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-CacheTimeCheckInterval

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the interval, in seconds, that a front-end Web server should wait before asking the application server for changes. This value is set per timer job, client application, or Web application.

The mininum value is 1, and there is no maximum value. The default value is 10.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DatabaseCredentials

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the PSCredential object that contains the user name and password to be used for database SQL authentication.

If SQL authentication is to be used, either the DatabaseCredentials parameter must be specified or both the DatabaseUserName and DatabasePassword parameters must be set.

The type must be a valid PSCredential object.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DatabaseName

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the name of the database that contains the term store for the managed metadata service application.

The type must be a valid name of a SQL Server database; for example MeatadataDB1.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DatabaseServer

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the name of the host server for the database specified in DatabaseName.

The type must be a valid name of a SQL Server database; for example SqlServerHost1.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisablePartitionQuota

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

When in partitioned mode, disables the partition quota.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NoQuota
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DoNotUnpublishAllPackages

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

If this flag is set, the packages will not be unpublished. If the HubUri parameter is changed, all content type packages will be unpublished by default.

If the HubUri parameter is not changed, this flag has no effect.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FailoverDatabaseServer

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the name of the host server for the failover database server.

The type must be a valid SQL Server host name; for example, SQLServerHost1.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FullAccessAccount

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies a comma-separated set of application pool accounts in the format <domain>\<account> that will be given read/write permission to the managed metadata service's term store and content type gallery. The accounts must already exist.

If a value is set by using this parameter, any existing values for the AdministratorAccount, ReadAccessAccount and RestrictedAccount parameters are removed. Consider setting all four parameters at the same time.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-GroupsPerPartition

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

When in partitioned mode, sets the maximum number of groups per partition.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Quota
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HubUri

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the fully qualified URL of the site collection that contains the content type gallery that the service will provide access to.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the managed metadata service application to update.

The type must be a valid GUID or the name of a valid managed metadata service application.

Parameter properties

Type:SPMetadataServiceCmdletPipeBind
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-LabelsPerPartition

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

When in partitioned mode, sets the maximum number of labels per partition.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Quota
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxChannelCache

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the maximum number of Windows Communication Foundation (WCF) channels that a front-end Web server holds open to the application server. This value is set per timer job, client application, or Web application.

The minimum value is 0, and there is no maximum value. The default value is 4.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the new name of the service application. The name can contain a maximum of 128 characters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PropertiesPerPartition

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

When in partitioned mode, sets the maximum number of properties per partition.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Quota
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReadAccessAccount

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies a comma-separated set of application pool accounts in the format <domain>\<account> that will be given read-only permission to the managed metadata service's term store and content type gallery. The accounts must already exist.

If a value is set by using this parameter, any previous values for the FullAccessAccount, RestrictedAccount and AdministratorAccount parameters are removed. Consider setting all four parameters at the same time.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RestrictedAccount

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies a comma-separated set of application pool accounts in the format <domain>\<account> that will be given permission to read the managed metadata service's term store and content type gallery and permission to write to open term sets and local term sets and to create new enterprise keywords. The accounts must already exist.

If a value is set by using this parameter, any previous values for the FullAccessAccount, ReadAccessAccount and AdministratorAccount parameters are removed. Consider setting all four parameters at the same time.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyndicationErrorReportEnabled

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Enables reporting of errors when content types are imported.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TermSetsPerPartition

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

When in partitioned mode, sets the maximum number of term sets per partition.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Quota
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TermsPerPartition

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

When in partitioned mode, sets the maximum number of terms per partition.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Quota
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.