Assigning Licenses to 365 Users via PowerShell

MS documentation for this: Assign Microsoft 365 licenses to user accounts with PowerShell

The commands I mostly commonly use are:

Get-MsolAccountSku
Get-MsolUser -All -UnlicensedUsersOnly
Get-MsolUser -All | Set-MsolUser -UsageLocation US

To assign a license to one user:

Set-MsolUserLicense -UserPrincipalName "[email protected]" -AddLicenses "reseller-account:O365_BUSINESS_PREMIUM"

To assign a license to all unlicensed users:

Get-MsolUser -All -UnlicensedUsersOnly | Set-MsolUserLicense -AddLicenses "litwareinc:ENTERPRISEPACK"

Leave a Reply

Your email address will not be published. Required fields are marked *