Assigning Office 365 Licensing in PowerShell
As part of my dive into automating as much as possible of a Microsoft Teams implementation or migration from Skype for Business On-Premise, I am focusing on scripting as much as possible. This post focuses on the licensing element. You are unable to enable users in Teams unless they have the correct licenses already assigned. The following commands will allow us to check what licensing is available to the tenant. To check this you must first connect to the Microsoft Online Service. Run: Connect-MsolService You will be prompted for your O365 credentials and any MFA (you have MFA enabled right...) Now run: Get-MsolAccountSku You will see the output on the screen of the different licenses on the tenant: In the output the first element before the license type we have the tenant name XXXXX: followed by the License type and how many units of each, warnings and ConsumedUnits (Assigned Licenses) This ties in with what we see in the GUI in Office 365 Admin Center: ...