Get List of Users and Associated Office 365 Licences

Just a quick memory dump for myself really.

To export a report of all users from Office 365 and their associated licences run the following command in Azure Powershell Module

Get-MsolUser -All | Select UserPrincipalName, Licenses | fl | Out-File c:\office365users.txt

To only export licenced users

Get-MsolUser -All | Where {$_.IsLicensed -eq "True"} | Select UserPrincipalName, Licenses | fl | Out-File c:\office365users.txt

 

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.