Add-SPSiteSubscriptionFeaturePackMember

將功能新增至 SharePoint 功能集。

Syntax

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

Description

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

此範例會建立功能集,並將所有網站範圍的功能新增至集合。

功能集會在最後一行重新整理,讓本機物件具有正確的值。

參數

-AssignmentCollection

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

-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