Add a New License Mapping

Scenario/Problem: You need to add a new license mapping to user license enforcement.

Solution: Use the Add-SPUserLicenseMapping cmdlet with the Mapping parameter.

When a new license mapping object is created (as explained in the previous section), you can pass that object variable into the Add-SPUserLicenseMapping cmdlet using the -Mapping parameter, as shown in Listing 11.6.

Listing 11.6. Adding a New License Mapping

$licenseMapping = New-SPUserLicenseMapping -SecurityGroup"Enterprise Admins" -License EnterpriseAdd-SPUserLicenseMapping -Mapping $licenseMapping

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.