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

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s