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.
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
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 |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Claim
Specifies the claims principal to license. The value must be an authentic claims principal.
Type: | SPClaim |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Value
Specifies the value of the claim. The value must be an authentic claim value.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |