Set-SPMetadataServiceApplication

设置 Managed Metadata Service 应用程序的属性。

语法

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>]

说明

Set-SPMetadataServiceApplication使用 cmdlet 设置托管元数据服务应用程序的属性。

有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet

示例

示例 1

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

此示例向现有 Managed Metadata Service 应用程序中添加内容类型集线器。 此外,它还在导入内容类型期间启用错误报告功能。

示例 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'

此示例对现有 Managed Metadata Service 应用程序设置相应权限。

如果使用 Windows PowerShell 设置任何帐户值,则应设置所有这些值。 该 Set-SPMetadataServiceApplication cmdlet 首先清除所有帐户,然后添加指定的帐户。

参数

-AdministratorAccount

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

以逗号分隔的用户帐户或服务帐户列表,格式 <为 domain>\<account> ,可以创建和运行服务应用程序。 这些帐户必须已经存在。

如果使用此参数设置值,则会删除 FullAccessAccount、ReadAccessAccount 和 RestrictedAccount 参数的所有现有值。 应考虑同时设置这四个参数。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ApplicationPool

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定要在其中运行 Managed Metadata Service 应用程序的 Web 服务的现有 IIS 应用程序池。

其值必须为代表 SPServiceApplicationPool 对象标识的 GUID;现有应用程序池的名称;或有效 SPServiceApplicationPool 对象的实例。

参数属性

类型:SPIisWebServiceApplicationPoolPipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AssignmentCollection

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。

使用全局参数时,所有对象均包含在全局存储中。 如果未立即使用对象,或未通过使用 Stop-SPAssignment 命令来处理对象,则可能会发生内存不足的情况。

参数属性

类型:SPAssignmentCollection
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CacheTimeCheckInterval

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定前端 Web 服务器在向应用程序服务器请求更改之前应等待的时间(以秒为单位)。 可针对每个计时器作业、客户端应用程序或 Web 应用程序设置该值。

最小值为 1,没有最大值。 默认值为 10。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

执行命令前,看到确认提示。 有关详细信息,请键入以下命令:get-help about_commonparameters

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DatabaseCredentials

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定包含用于数据库 SQL 身份验证的用户名和密码的 PSCredential 对象。

如果将使用 SQL 身份验证,必须指定 DatabaseCredentials 参数,或者必须设置 DatabaseUserName 和 DatabasePassword 参数。

键入的值必须是有效的 PSCredential 对象。

参数属性

类型:PSCredential
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DatabaseName

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定将包含 Managed Metadata Service 应用程序的术语库的数据库的名称。

键入的值必须是有效的 SQL Server 数据库名称;例如,MeatadataDB1。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DatabaseServer

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定在 DatabaseName 中指定的数据库的主机服务器名称。

键入的值必须是有效的 SQL Server 数据库名称;例如,SqlServerHost1。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DisablePartitionQuota

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

处于分区模式时,禁用分区配额。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

NoQuota
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DoNotUnpublishAllPackages

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

如果设置此标志,则不会取消发布包。 如果 HubUri 参数发生更改,则默认情况下将取消发布所有内容类型包。

如果 HubUri 参数未发生更改,则此标志将不会产生影响。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-FailoverDatabaseServer

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定故障转移数据库服务器的主机服务器的名称。

键入的值必须是有效的 SQL Server 主机名;例如,SQLServerHost1。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-FullAccessAccount

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

以 domain>\<account> 格式<指定一组逗号分隔的应用程序池帐户,这些帐户将被授予对托管元数据服务的术语存储和内容类型库的读/写权限。 这些帐户必须已经存在。

如果使用此参数设置值,则会删除 AdministratorAccount、ReadAccessAccount 和 RestrictedAccount 参数的任何现有值。 应考虑同时设置这四个参数。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-GroupsPerPartition

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

处于分区模式时,设置每个分区的最大组数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

Quota
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-HubUri

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定网站集的完全限定 URL,服务将提供该网站集中内容类型库的访问权限。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Identity

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定要更新的 Managed Metadata Service 应用程序。

键入的值必须为有效 GUID 或有效 Managed Metadata Service 应用程序的名称。

参数属性

类型:SPMetadataServiceCmdletPipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:1
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-LabelsPerPartition

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

处于分区模式时,设置每个分区的最大标签数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

Quota
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-MaxChannelCache

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定前端 Web 服务器应为应用程序服务器打开的最大 Windows Communication Foundation (WCF) 通道数。 可针对每个计时器作业、客户端应用程序或 Web 应用程序设置该值。

最小值为 0,没有最大值。 默认值为 4。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Name

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定服务应用程序的新名称。 该名称最多可包含 128 个字符。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-PropertiesPerPartition

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

处于分区模式时,设置每个分区的最大属性数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

Quota
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ReadAccessAccount

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

以 domain>\<account> 格式<指定一组逗号分隔的应用程序池帐户,这些帐户将被授予对托管元数据服务的术语存储和内容类型库的只读权限。 这些帐户必须已经存在。

如果使用此参数设置值,则会删除 FullAccessAccount、RestrictedAccount 和 AdministratorAccount 参数的所有先前值。 应考虑同时设置这四个参数。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RestrictedAccount

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

以域>\<account> 格式<指定一组以逗号分隔的应用程序池帐户,这些帐户将被授予读取托管元数据服务的术语存储和内容类型库的权限,以及写入打开术语集和本地术语集的权限,以及创建新企业关键字的权限。 这些帐户必须已经存在。

如果使用此参数设置值,则会删除 FullAccessAccount、ReadAccessAccount 和 AdministratorAccount 参数的所有先前值。 应考虑同时设置这四个参数。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SyndicationErrorReportEnabled

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

在导入内容类型时启用错误报告功能。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-TermSetsPerPartition

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

处于分区模式时,设置每个分区的最大术语集数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

Quota
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-TermsPerPartition

适用:SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

处于分区模式时,设置每个分区的最大术语数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

Quota
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

显示一条描述命令作用的消息,而不执行命令。 有关详细信息,请键入以下命令:get-help about_commonparameters

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters