FixesOffice 365

365 Licensed Users

The list of licensed user can now be processed further, for example by exporting it to a CSV file that can be opened in Excel for reporting purposes or further analysis: Get-MsolUser | Where-Object { $_.isLicensed -eq “TRUE” } | Export-Csv c:\LicensedUsers.csv

A screen shot of exporting licensed users to Excel

Note that this exports all available properties for the licensed users. To export only specific properties, you can use the Select-Object cmdlet to specify which properties to use. As an example, only UserPrincipalName, DisplayName, Country, and Department will be exported:
Get-MsolUser | Where-Object { $_.isLicensed -eq “TRUE” } | Select-Object UserPrincipalName, DisplayName, Country, Department | Export-Csv c:\LicensedUsers.csv

A screen shot of runnning the Select-Object cmdlet