I need to pull from O365 the following information for each licensed user; I am having difficulty finding the syntax to get CustomAttributes from MailBox. Any suggestions?
From Get-MsolUser
UserPrincipalName
DisplayName
FirstName
LastName
Department
Office
Licenses Account SkuId
From Get-Mailbox
CustomAttribute 11
Here is the scrip I run that gets the user info. How can I add to the script to get the CustomAttribute 11 added the csv file?
Get-MsolUser –all | Where-Object { $.isLicensed -eq “TRUE” } | Select-Object UserPrincipalName, DisplayName, FirstName, LastName, Department, Office, {$.Licenses.AccountSkuId} | Export-Csv c:\zip\201607LicensedUsers.csv -NoTypeInformation