PS - Office365 - Export Assigned Licenses To CSV

To export a list of assigned Office 365 licenses to a CSV file execute the following commands:

# Connect to Office 365
Connect-MsolService

#Get a list of the users, their license status and export to c:\userlist.csv file.
Get-MSOLUser -All | select userprincipalname,UsageLocation,{$_.serviceplan.servicename},islicensed,
,{$_.Licenses.AccountSkuId}| Export-CSV c:\userlist.csv -NoTypeInformation



Account SKU Examples:

POWERAPPS_INDIVIDUAL_USER

ENTERPRISEPACK
SHAREPOINTSTORAGE
SHAREPOINTENTERPRISE
POWER_BI_STANDARD
EMS
MCOIMP
SHAREPOINTSTANDARD
RIGHTSMANAGEMENT_ADHOC
MCOSTANDARD

Comments