shell command to get an inventory of all mailboxes and distribution lists.

pma111
pma111 used Ask the Experts™
on
is there a way in exchange server to get a full report of all mailboxes, which AD account they are associated with (mailbox owner?), and all distribution groups. Just a really basic list of all mailboxes and distribution groups in a single report, showing type, e.g. this is a mailbox, this is a distribution list, written to CSV. Similar I suppose to a full version of the global address list in outlook but also showing hidden entries, but to easily show which items are mailboxes and which are distribution lists.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Sr. Systems Administrator
Commented:
Get-recipient -resultsize unlimited | select name, recipienttype | export-csv <path>
FOXActive Directory/Exchange Engineer
Top Expert 2015

Commented:
create a folder on your c:drive named Temp   example  c:\Temp
Run the following command in your Exchange Management Shell

Get-Recipient -ResultSize Unlimited | Select DisplayName, PrimarySmtpAddress,SamAccountName,RecipientType,ManagedBy | Sort DisplayName | Export-csv 'c:\temp\RecipientResults.csv' -notypeinformation

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial