Submitted By: Pelle Andersen

Exports both mailbox and user information to a single comma-separated values (CSV) file.

PowerShell
Edit|Remove
Get-mailbox | Format-Table Alias,DisplayName,@{label="FirstName";expression={(Get-User -Identity $_.Name).FirstName}},@{label="LastName";expression={(Get-User -Identity $_.Name).LastName}},SAMAccountName,Name,ServerName,Database,AddressListMembership,PrimarySmtpAddress,EmailAddresses,HiddenFromAddressListsEnabled,@{label="Title";expression={(Get-User -Identity $_.Name).Title}},@{label="Company";expression={(Get-User -Identity $_.Name).Company}},@{label="Department";expression={(Get-User -Identity $_.Name).Department}},Office,@{label="Phone";expression={(Get-User -Identity $_.Name).Phone}},@{label="MobilePhone";expression={(Get-User -Identity $_.Name).MobilePhone}} -Autosize|Out-File c:\mailboxes.csv -width 700