Assign Specific EMS Licenses for Bulk of Users

Problem:

I need to assign all EMS licenses for Specific Users except Azure RMS Premium. How can you do that?

capture7

Solution:

To assign EMS licenses for Specific Users,  you need to do the following:

  1. Create CSV for those users as below
  2. 23

  3. Connect to office 365 using PowerShell
  4. import-module MSOnline
    $msolcred = get-credential
    connect-msolservice -credential $msolcred

    capture

  5. To get subscription of EMS
  6. Get-MsolAccountSku

    capture1

  7. To get name of Azure RMS Premium license, you need to run this command
  8. Get-MsolAccountSku | Where-Object {$_.SkuPartNumber -eq “EMS”} | ForEach-Object {$_.ServiceStatus}

    capture2

  9. To enable all EMS licenses for Specific Users except Azure RMS Premium , you need to run below commands
  10. $EMSlic = New-MsolLicenseOptions -AccountSkuId mlab10:EMS –DisabledPlans RMS_S_PREMIUM

    Import-Csv .\UPN.CSV | foreach-object {Set-MsolUserLicense -UserPrincipalName $_.UPN -AddLicenses mlab10:EMS -LicenseOptions $EMSlic} | Set-MsolUser -UsageLocation “EG”

    capture4

  11. Verify those users take EMS license with GUI & PowerShell
  12. (Get-Msoluser -UserPrincipleName david@imperialits.com).licenses.servicestatus

    capture6 capture5

 

Advertisements
This entry was posted in Enterprise Mobility, Enterprise Mobility. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s