Exchange 2013 user mailbox usage

Hi, Is it possible to export users in a OU with following information:-
1) Username
2) DATABASE
3) User Mailbox quota
4) Current user mailbox usage

Thank you.
TJOSYAsked:
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.

MAS (MVE)EE Solution GuideCommented:
Please check this it may help. Download the script and try
https://gallery.technet.microsoft.com/exchange/Email-statistics-including-e9cb1b26
0
TJOSYAuthor Commented:
@MAS: TY..I don't see this script will help to get the information exported to CSV
0
MAS (MVE)EE Solution GuideCommented:
Please check the article completely
The second script will export to CSV
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

TJOSYAuthor Commented:
its in table format not csv
0
Vaseem MohammedCommented:
Hope this will work for you.
Get-Mailbox -RecipientTypeDetails UserMailbox | select samAccountname, database, usedatabasequotadefaults,IssueWarningQuota,ProhibitSendQuota,ProhibitSendReceiveQuota,@{N="Mailbox Usage";E={Get-MailboxStatistics -Identity $_ | select -ExpandProperty totalitemsize}} | Export-Csv c:\Attachments\test.csv -NoTypeInformation

Open in new window

If you want more information for the user, use get-mailbox username | fl and see which property you want to include and punch it in the select statement.
0
TJOSYAuthor Commented:
@Vaseem: its ok, once we add "-path" after "Export-Csv"
Export-Csv -path c:\Attachments\test.csv -NoTypeInformation.

Full script:
Get-Mailbox -RecipientTypeDetails UserMailbox | select samAccountname, database, usedatabasequotadefaults,IssueWarningQuota,ProhibitSendQuota,ProhibitSendReceiveQuota,@{N="Mailbox Usage";E={Get-MailboxStatistics -Identity $_ | select -ExpandProperty totalitemsize}} | Export-Csv -path c:\Attachments\test.csv -NoTypeInformation

Again, this have two issues:-
1) it doesn't give me user more than 1000 users
2) this script cannot export information for specific AD OU.

Please help.
0
Vaseem MohammedCommented:
Try this.
Get-Mailbox -ResultSize Unlimited -OrganizationalUnit "ou=OUName,dc=domain,dc=com" -RecipientTypeDetails UserMailbox | select samAccountname, database, usedatabasequotadefaults,IssueWarningQuota,ProhibitSendQuota,ProhibitSendReceiveQuota,@{N="Mailbox Usage";E={Get-MailboxStatistics -Identity $_ | select -ExpandProperty totalitemsize}} | Export-Csv -path c:\Attachments\test.csv -NoTypeInformation

Open in new window

To get the exact DN of OU, go to ADUC and 1st make sure Advanced Features is enabled.
Adv featuresGo to the Targetted OU Properties windows, Attribute Editor, Select the DN and View. Copy the DN and paste it in your script.
DN
0

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
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
Powershell

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.