Update Office 365 License features using Powershell

You can easily add a new license with required features and remove an existing license using Azure AD Powershell cmdlet Set-MsolUserLicense.
In certain scenario you may need to update an existing license features (enable or disable license sub plans) using this cmdlet.

Use the below command to set a new license.

Set-MsolUserLicense -UserPrincipalName '[email protected]' -AddLicenses 'contoso:ENTERPRISEPACK'

To assign multiple licenses, you have to provide AccountSkuId of all the licenses as comma (,) separated values.

Set-MsolUserLicense -UserPrincipalName '[email protected]' -AddLicenses contoso:ENTERPRISEPACK,contoso:AAD_PREMIUM

You can enable only particular set of features while adding new license to an user. we have to use the powershell cmdlet New-MsolLicenseOptions to set license features that we want to disable (or remove) from new license.

$options = New-MsolLicenseOptions -AccountSkuId 'contoso:O365_BUSINESS_PREMIUM' -DisabledPlans OFFICE_BUSINESS,MCOSTANDARD
Set-MsolUserLicense -UserPrincipalName '[email protected]' -LicenseOptions $options –AddLicenses 'contoso:O365_BUSINESS_PREMIUM'

Note: There is no option EnabledPlans like DisabledPlans, so we can’t set only required features in straightforward way, we can achieve this only by excluding non-required features by using DisabledPlans option.

Update existing Office 365 License features

If you want to update or disable license features in existing license, you have to set only LicenseOptions in Set-MsolUserLicense cmdlet (exclude the parameter –AddLicenses).

$options = New-MsolLicenseOptions -AccountSkuId 'contoso:O365_BUSINESS_PREMIUM' -DisabledPlans OFFICE_BUSINESS,MCOSTANDARD
Set-MsolUserLicense -UserPrincipalName '[email protected]' -LicenseOptions $options

Advertisement

Leave a Comment