Imagine that you have two different license types in your Office 365, perhaps the E1 and the E3 license. Now imagine that one of your users who already has the E1 license assigned, wants to take advantage of having the upgraded features that the E3 plan has to offer but obviously wants to keep all existing data.
This simple PowerShell command, run in the Windows Azure Active Directory Module for Windows PowerShell will give the user the new license and remove the existing one to ensure that the users are not in a state where the license has been removed but the new one assigned which is what can happen when using the web based Office 365 Web Admin Portal.
Once you have connected to your tenant using Windows Azure Active Directory Module for Windows PowerShell run the following command to see what licenses are available:
This will list out the available SKUs or license types that you have in your tenant. For example it may list:
DOMAINNAME:STANDARDWOFFPACK = E1 License
DOMAINNAME:ENTERPRISEPACK = E3 License
The following command will remove the E1 license and immediately assign the E3 license to the user:
Set-MsolUserLicense -UserPrincipalName firstname.lastname@example.org -AddLicenses “DOMAIN:ENTERPRISEPACK”