New-SPUserLicenseMapping

建立授權對應物件。

Syntax

New-SPUserLicenseMapping
   -Claim <SPClaim>
   -License <String>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-WebApplication <SPWebApplicationPipeBind>]
   [-WhatIf]
   [<CommonParameters>]
New-SPUserLicenseMapping
   -ClaimType <String>
   -License <String>
   -OriginalIssuer <String>
   -Value <String>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-ValueType <String>]
   [-WebApplication <SPWebApplicationPipeBind>]
   [-WhatIf]
   [<CommonParameters>]
New-SPUserLicenseMapping
   -License <String>
   -Role <String>
   -RoleProviderName <String>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-WebApplication <SPWebApplicationPipeBind>]
   [-WhatIf]
   [<CommonParameters>]
New-SPUserLicenseMapping
   -License <String>
   -SecurityGroup <String>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-WebApplication <SPWebApplicationPipeBind>]
   [-WhatIf]
   [<CommonParameters>]

Description

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet parameter sets.

使用 Cmdlet New-SPUserLicenseMapping 建立新的授權對應物件。 必須先使用此 Cmdlet, Add-SPUserLicenseMapping 才能使用 Cmdlet。

使用 Cmdlet 建立的 New-SPUserLicenseMapping 物件會儲存在記憶體中,而且不會寫入 SharePoint Server 中的任何資料庫。 建立物件之後,您可以使用管線將結果傳送至 Add-SPUserLicenseMapping Cmdlet。

如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet

範例

-----------------------範例---------------------------)

$a = New-SPUserLicenseMapping -SecurityGroup EntSecGroup -License Enterprise
$a | Add-SPUserLicenseMapping

此範例會為名為 'EntSecGroup' 的 Active Directory 安全群組建立授權對應物件,然後使用管線將結果傳送至 Add-SPUserLicenseMapping Cmdlet。

參數

-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

-Claim

指定要授權的宣告主體。 此值必須是有效的宣告主體。

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

-ClaimType

指定宣告的類型。 此值必須是有效的宣告類型名稱。

Type:String
Position:Named
Default value:None
Accept pipeline input:False
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

-License

指定支援的 SharePoint 使用者授權名稱。 如需 SharePoint 伺服器陣列上支援的授權完整清單,請參閱 Get-SPUserLicense Cmdlet。

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

-OriginalIssuer

指定宣告的原始發行者。 此值必須是有效的原始發行者名稱。

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

-Role

指定表單型角色的名稱。 此值必須是有效的表單型角色名稱。

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

-RoleProviderName

指定角色提供者的名稱。 此值必須是有效的角色提供者名稱。

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

-SecurityGroup

指定 AD DS 安全性群組的名稱。 此值必須是 Active Directory 安全性群組的名稱。

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

-Value

指定宣告的值。 此值必須是有效的宣告值。

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

-ValueType

指定宣告的值類型。 此值必須是有效的宣告值類型名稱。

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

-WebApplication

Specifies the URL, GUID, web application name, or web application object instance where the mapping is to be added. If you omit this parameter, the mapping is applied to the entire farm.

此類型必須是格式為 http://server_name 或 http://server_name/sites/sitename 的 URL、GUID (例如 12345678-90ab-cdef-1234-567890bcdefgh)、Web 應用程式名稱 (例如 SharePoint - 80),或 Web 應用程式物件執行個體。

Type:SPWebApplicationPipeBind
Position:Named
Default value:None
Accept pipeline input:False
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