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

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.
LVL 4
pma111Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeff GloverSr. Systems AdministratorCommented:
Get-recipient -resultsize unlimited | select name, recipienttype | export-csv <path>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FOXActive Directory/Exchange EngineerCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.