Add-SPSiteSubscriptionFeaturePackMember

将功能添加到 SharePoint 功能集。

语法

Add-SPSiteSubscriptionFeaturePackMember
   [-Identity] <SPSiteSubscriptionFeaturePackPipeBind>
   -FeatureDefinition <SPFeatureDefinitionPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

说明

Add-SPSiteSubscriptionFeaturePackMember cmdlet 将功能添加到提供的 SharePoint 功能集。 功能集是可与任何网站订阅关联的 SharePoint 功能的允许列表。 如果将某个功能集分配给网站订阅,那么只有该功能集中的 SPFeatures 对象才能在属于该网站订阅的网站集和网站上使用。 功能集包含一个 GUID 列表,这些 GUID 对应于关联网站订阅的允许列表中的每个功能。

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

示例

-------------示例----------------

$fp = New-SPSiteSubscriptionFeaturePack
Get-SPFeature -limit all | Where{ $_.Scope -eq "WEB" } | Add-SPSiteSubscriptionFeaturePackMember -id $fp
$fp = Get-SPSiteSubscriptionFeaturePack $fp

此示例将创建一个功能集,然后将网站范围内的所有功能添加到该功能集。

最后一行刷新功能集,以使本地对象获得正确的值。

参数

-Confirm

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

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-FeatureDefinition

指定要添加到功能集的功能定义、名称或 GUID。

Type:SPFeatureDefinitionPipeBind
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identity

指定要在其中添加给定 SharePoint 功能的功能集对象或 GUID。

键入的值必须为 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID;或功能集的有效名称(例如,FeatureSet1);或者有效 SPFeatureSet 对象的实例。

Type:SPSiteSubscriptionFeaturePackPipeBind
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-工作分配

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.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition