Bulk Assign / remove Office 365 Licenses – AzureAD V2 module based PowerShell script with UI

Managing licenses with office 365 has become easier with Azure-AD group based licensing and multi-select option on the office portal.

But, there are many scenarios where Adminstrators go for direct License assignment and removal for a custom list of users. The powershell scripts my customer had for these purposes uses complex parameters and it didn’t support all the scenarios they needed. Also, any mistake on passing parameters would result in wrong assignment of licenses.

I created this UI tool to help customer manage any kind of direct license management against a custom list of Users from an input file or by running a query against AzureAD (Get-AzureADUser). It is UI based and flexible to use. This script uses new AzureAD V2 module which implements the Graph API in PowerShell and provides access to newer functionality.

The script can be downloaded from https://aka.ms/o365licensemgmtscript


  • This script launches Windows Presentation framework based UI form.
  • Provides users with options either to run Online Query or process users from a CSV list.
  • Using a License picker window, users can Add and/or Remove licenses.
  • Apply it on all users or selected users from the list, all at once.
  • This script will only append to or remove the existing user licenses and plans.
  • At Present, this script requires no Input parameters, but default switches like -Verbose can be added to view progress on the Powershell window.
  • It creates a log by default on the script's directory which includes the Licenses and runtime details.

Note: This script will only append to or remove the existing user licenses and plans.  It doesn’t replace any Licenses.

I hope you find this script useful when dealing with direct assignment / removal of Office 365 licenses.

Please let me know if you find it useful or for any suggestions you may have.

Thank you