Hi @Roger Roger ,
UserPrincipalName will be empty in the command you shared above. Based on my test, you can use the command below so that all properties listed can be included:
Get-DistributionGroupMember -Resultsize Unlimited mailenabledsecuritygroup@contoso.com | %{Get-Mailbox $_.Name | select DisplayName,userprincipalname,@{Expression={(Get-User $_.Name).title};Label="title";},PrimarySMTPAddress,RecipientType} | Export-csv -path C:\temp\output.csv -NoTypeInformation
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.