Mailbox CustomAttribute

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
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

This is how you combine objects. replace mailboxmoveremotehostname with the property you want, I just picked one at random that is populated.

get-msoluser -UserPrincipalName ‘’ | select userprincipalname,displayname,islicensed,@{n=‘exonline’;e={(Get-Mailbox $_.userprincipalname).MailboxMoveRemoteHostName}}

In long form it would look something like this.

$msolusers = Get-MsolUser –all | Where-Object { $_.isLicensed -eq "TRUE" }

foreach($user in $msolusers){

$exchangestuff = (Get-Mailbox $user.userprincipalname).MailboxMoveRemoteHostName


upn = $user.userprincipalname
exchangestuff = $exchangestuff