Connect to Cloud with or without MFA and replace user licenses with menu.

Made a powershell script to replace or add user licenses based on the same csv that were used for Exchange Hybrid migration.

First You need a csv to be like this, but probably You have it if You did a migration.

In the first part, I used a script from AdminDroid (on excellent audit and reporting tool btw) and modified it a bit, just a bit. The modified script can be download with the script and put to a file called connect365services.ps1

The original one here

Then I added a menu for license assignements or for quitting to Powershell. If You quit You can still use all the connected sessions.

After You choose to replace licenses, You will see all the Skus in the tenant and You will be given a directory listing to find the csv-file:

Then the script will add location to FI in my case, change accordingly.

And here is the full script with menus.


Author: Harri Jaakkonen