1
votes

I'm currently looking at dumping some user contact details out of the exchange to import into another system which holds contact details (.csv).

The requirements are found when manually doing an export inside EMC 2010. However, I can't seem to get the PowerShell attribute names right.

The fields are Company, Primary SMTP Address, First Name, Last Name, Title, Department, Phone, Recipient Type Details, Hidden from Address Lists

I can only seem to find the DisplayName and Primary email address

Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,PrimarySmtpAddress,  @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where{$_.HiddenFromAddressListsEnabled -eq $true} | ForEach-Object {$_.SmtpAddress}}} | Export-CSV C:\temp\smtp.csv -NoTypeInformation

Is there a way to get a list of what all the Get-Mailbox attributes are?

2

2 Answers

1
votes

Run this:

Get-Mailbox <your primary smtp address> | format-list *

and see if that doesn't provide some clues.

0
votes

I see this is old, but adding a note. I think what he was asking is in the Exchange 2010 EMC you can drill down to Mailboxes and columns you can choose to view include Company. But in the shell when you do "get-mailbox ID | FL" company is not one of the details.

My similar issue is I would like to use the get-mailbox command and pull a report that includes displayname, company, primarysmtpaddress, and emailaddresspolicyenabled. Can't seem get all 4 of those fields in EMC or through shell