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

Get-MsolAccountSku

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

domain:STANDARDWOFFPACK_STUDENT

4. Make a variable with that SKU

$licensetype=domain:STANDARDWOFFPACK_STUDENT

5. Make changes.

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

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s