TechShizz | Administering Licenses in Office 365 via PowerShell

Administering Licenses in Office 365 via PowerShell

Manage user licences in Azure PowerShell

 

Remember:

connect-msolservice

 

Get-MsolaccountSku

 

Get-MsolaccountSku | Where-Object {$_.SkuPartNumber -eq "EnterprisePack"} | ForEach-Object {$_.ServiceStatus}

Get-MsolaccountSku | Where-Object {$_.SkuPartNumber -eq

 

 

List of all users

Get-MsolUser -all

 

Export list of user licences

Get-MsolUser -all | ft displayname, islicensed | Out-File "C:\UserLicences.csv"

Get Licensed users results

 

Set a users usage location (Required before assigning a licence)

Set-MsolUser -userprincipalname user@domain.local -useagelocation "GB"

 

Assign a licence to a user

Set-MsolUserLicence -userprincipalname user@domain.local -AddLicenses "TeamRou:EnterprisePack"

Assigne licenses results

 

Remove a licence from a user

Set-MsolUserLicence -userprincipalname user@domain.local -Removelicences "CBTNuggets346:EnterprisePack"

 

Remove licenses results


Add comment