PowerShell Script to Assign License in Office365

Use the following script to Assign License in Office365

First connect to Office 365 via PowerShell


This list the current license available in Office 365.

Set-MsolUser -UserPrincipalName username@office365domain.co.uk -UsageLocation UK

You first need to set the users to their local location in my case UK

Set-MsolUserLicense -UserPrincipalName username@office365domain.co.uk –AddLicenses “OFFICE365DOMAIN:O365_BUSINESS_ESSENTIALS”

This command assigns the licesnes you will need