New-SPUserLicenseMapping

Creates a license mapping object.

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 (http://go.microsoft.com/fwlink/?LinkID=187810).

Use the New-SPUserLicenseMapping cmdlet to create a new license mapping object. This cmdlet must be used first before the Add-SPUserLicenseMapping cmdlet can be used.

The object created by using the New-SPUserLicenseMapping cmdlet is stored in memory and is not written to any database in SharePoint Server. After the object is created you can pipe the result to the Add-SPUserLicenseMapping cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251831 (http://go.microsoft.com/fwlink/p/?LinkId=251831).

Examples

----------------------- EXAMPLE---------------------------)

C:\PS>$a = New-SPUserLicenseMapping -SecurityGroup yoursecuritygroup -License Enterprise

C:\PS>$a | Add-SPUserLicenseMapping

This example creates a license mapping object and then pipes the result to the Add-SPUserLicenseMapping cmdlet.

Required Parameters

-Claim

Specifies the claims principal to license. The value must be an authentic claims principal.

Type:SPClaim
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-ClaimType

Specifies the type of the claim. The value must be an authentic name of a claim type.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-License

Specifies the name of a supported SharePoint user license. For the full list of supported licenses on a SharePoint farm, see the Get-SPUserLicense cmdlet.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-OriginalIssuer

Specifies the original issuer of the claim. The value must be the authentic name of an original issuer.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-Role

Specifies the name of a forms-based role. The value must be an authentic name of a forms-based role.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-RoleProviderName

Specifies the name of a role provider. The value must be an authentic name of a role provider.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-SecurityGroup

Specifies the name of an AD DS security group. The value must be a name of an Active Directory security group.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-Value

Specifies the value of the claim. The value must be an authentic claim value.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016

Optional Parameters

-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 (ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-Confirm

Prompts you for confirmation before executing the command. For more information, type the following command: 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 2013, SharePoint Server 2016
-ValueType

Specifies the value type of the claim. The value must be an authentic name of a claim value type.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-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.

The type must be an URL in the form http://server_name or http://server_name/sites/sitename, a GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh), a name of a web application (for example, SharePoint - 80), or an instance of a web application object.

Type:SPWebApplicationPipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2013, SharePoint Server 2016
-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 2013, SharePoint Server 2016