Office365 Bulk Licensing Based on UPN

1. A prerequisite to assigning licenses is settting the usage location. This script applies US to all users.  If the usage location was not already set, you’ll need to run this, defining usage location as appropriate.

get-msoluser -all | set-msoluser -usagelocation US

2. You will need the SKU number for licensing


3. Copy that SKU number for the license you would like to apply to the users in bulk.


4. Make a variable with that SKU


5. Make changes.

Get-MsolUser -All | where-object {$_.UserPrincipalName -like “*” -and $_.isLicensed -like “FALSE”} | Set-MSOLUserLicense -AddLicenses $licensetype

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s