Export (0) Print
Expand All

New-SPUserLicenseMapping

SharePoint 2013

Published: July 16, 2012

Applies to:  SharePoint Foundation 2013 | SharePoint Server 2013 Enterprise 

Creates a license mapping object.

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

Parameters

1

Parameter

Required

Type

Description

License

Required

System.String

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.

SecurityGroup

Required

System.String

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

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

noteNote:

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.

Confirm

Optional

System.Management.Automation.SwitchParameter

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

WebApplication

Optional

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

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.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

2

Parameter

Required

Type

Description

License

Required

System.String

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.

Role

Required

System.String

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

RoleProviderName

Required

System.String

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

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

noteNote:

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.

Confirm

Optional

System.Management.Automation.SwitchParameter

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

WebApplication

Optional

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

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.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

3

Parameter

Required

Type

Description

Claim

Required

Microsoft.SharePoint.Administration.Claims.SPClaim

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

ClaimType

Required

System.String

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

License

Required

System.String

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.

OriginalIssuer

Required

System.String

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

Value

Required

System.String

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

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

noteNote:

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.

Confirm

Optional

System.Management.Automation.SwitchParameter

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

ValueType

Optional

System.String

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

WebApplication

Optional

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

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.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

4

Parameter

Required

Type

Description

Claim

Required

Microsoft.SharePoint.Administration.Claims.SPClaim

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

License

Required

System.String

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.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

noteNote:

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.

Confirm

Optional

System.Management.Automation.SwitchParameter

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

WebApplication

Optional

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

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.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

Detailed 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 2013. After the object is created you can pipe the result to the Add-SPUserLicenseMapping cmdlet.

Input Types

Return Types

----------EXAMPLE-------------

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

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

Change History

Date Description

July 16, 2012

Initial publication

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft