Skip to content

Instantly share code, notes, and snippets.

@ciphertxt
Last active January 11, 2016 14:45
Show Gist options
  • Select an option

  • Save ciphertxt/fa0cb44183943c16b214 to your computer and use it in GitHub Desktop.

Select an option

Save ciphertxt/fa0cb44183943c16b214 to your computer and use it in GitHub Desktop.
Gets a collection of licensed users from O365 tenant and exports to a CSV
Get-MsolUser -All | Where-Object { $_.isLicensed -eq "TRUE" } | Select-Object UserPrincipalName, DisplayName, Country, Department -ExpandProperty Licenses | Export-Csv c:\LicensedUsers.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment