Share via


New-SPUserLicenseMapping

Creates a license mapping object.

Syntax

TrustIdentity

New-SPUserLicenseMapping
    -Claim <SPClaim>
    -License <String>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-Confirm]
    [-WebApplication <SPWebApplicationPipeBind>]
    [-WhatIf]
    [<CommonParameters>]

ClaimsValues

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

FormsAuth

New-SPUserLicenseMapping
    -License <String>
    -Role <String>
    -RoleProviderName <String>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-Confirm]
    [-WebApplication <SPWebApplicationPipeBind>]
    [-WhatIf]
    [<CommonParameters>]

WindowsAuth

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.

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 SharePoint Server Cmdlets.

Examples

EXAMPLE)

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

This example creates a license mapping object for the Active Directory secured group named 'EntSecGroup' and then pipes the result to the Add-SPUserLicenseMapping cmdlet.

Parameters

-AssignmentCollection

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:SPAssignmentCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Claim

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:SPClaim
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

TrustIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ClaimType

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ClaimsValues
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-License

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-OriginalIssuer

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ClaimsValues
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Role

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FormsAuth
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RoleProviderName

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FormsAuth
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecurityGroup

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

WindowsAuth
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Value

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ClaimsValues
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ValueType

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ClaimsValues
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WebApplication

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:SPWebApplicationPipeBind
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.