How to change Office 365 user licenses using PowerShell
The following is a comparison between changing licenses of Office 365 users with Windows PowerShell and ADManager Plus:
Windows PowerShell
Steps to change licenses of Office 365 users using PowerShell:
- Identify the Office 365 tenant account from which you want to retrieve the report.
- Identify the cmdlets you need for the action.
- Compile the script.
- Execute it in Windows PowerShell.
Sample Windows PowerShell script:
Copied
Get-MsolUser -all | Where {$_.Licenses.AccountSkuId -contains "your-tenant-name:EXCHANGESTANDARD_STUDENT"} | Set-MsolUserLicense -AddLicenses "your-tenant-name:STANDARDWOFFPACK_STUDENT" -RemoveLicenses "your-tenant-name:EXCHANGESTANDARD_STUDENT"
Click to copy entire script
ADManager Plus
Steps to change licenses for Office 365 users:
- Select Office 365 -> License Management ->Assign/Remove licenses .
- Select Replace licenses option, choose the desired license(s), and User Location from the drop down list.
- Choose the Office 365 account and its users, and click Apply
Screenshot
» Start 30-day Free Trial
Following are the limitations to change licenses of Office 365 users using native tools like Windows PowerShell:
- With additional filters, the script will get longer and more complicated.
- Troubleshooting these scripts requires extensive AD and scripting expertise.
ADManager Plus can help you replace licenses of Office 365 users in a simple and intuitively designed UI.
Assign or remove Office 365 licenses for multiple accounts in one go with ADManager Plus.
Get 30-day free trial.