Mailbox Details (askme4tech.com)

Before months i had a request to export size of mailboxes from our Exchange Server. As we know this can't happened from Exchange Management Console except if you start to type in Excel one by one the Users. When you will finish? You don't know. So i use Exchange Management Shell to export all mail enable Users, email addresses from all Databases or from specific databases of Exchange Server and save it in CSV file. It will take maximum 5 minutes.

As you already know Powershell it's very powerfull and can use it in your day by day tasks to automate your work.

This article can help you with few commands to get Reports in minute from Exchange Server.

But as IT Pro you manage different Systems like Domain Controllers , HYPER-V Hosts , Workstations and more.

In the Category of Powershell you can find more commands and simple tools that can help you to export different types of Reports from Active Directory ,Servers and  Workstations.

So let's start !

Login in your Exchange Server

Go Start - - >Exchange Server 2010 - - > Exchange Mnagament Shell.

View Mail Enable Users Email Addresses.

Get-Mailbox -ResultSize Unlimited -RecipientType UserMailbox | Select Displayname,EmailAddresses

askme4tech.com 2 mins read

Export Mail Enable Users Email Addresses in CSV.

Get-Mailbox -ResultSize Unlimited -RecipientType UserMailbox | Select Displayname,EmailAddresses  | Export-csv c:\csv\mailenableusers.csv

View Mail Enable Users Email Addresses from Specific Database.

Get-Mailbox -ResultSize Unlimited -RecipientType UserMailbox Database "Mailbox Database 0118323219" | Select Displayname,EmailAddresses,Database

Export Mail Enable Users Email Addresses from Specific Database in CSV.

Get-Mailbox -ResultSize Unlimited -RecipientType UserMailbox Database "Mailbox Database 0118323219" | Select Displayname,EmailAddresses,Database | Export-csv c:\csv\mailenableusersdatabase.csv

View Mail Enable User  Mailboxes included the Size of Mailboxes.

Get-MailboxStatistics -Server dc | Select Displayname,TotalItemSize,ItemCount

Export Mail Enable User Mailboxes included the Size of Mailboxes in CSV.

Get-MailboxStatistics -Server dc | Select Displayname,TotalItemSize,ItemCount | Export-csv c:\csv\mailboxessize.csv

Until now we use Get-Mailbox command to view or export all mail enable Users. in Exchange Server except from Mail Enable Users we have email addresses from Distribution Groups and Contacts. With Get-Mailbox we ca get only Mail enable user email addresses. So i found another one command Get-Recipient that we can use to export all email addresses from Exchange Server

View all email addresses included Disitribution Groups and Contacts.

Get-Recipient| select name -ExpandProperty emailaddresses | select name,smtpaddress

Export all email addresses included Disitribution Groups and Contacts in CSV.

Get-Recipient| select name -ExpandProperty emailaddresses | select name,smtpaddress  | Export-csv c:\csv\mailboxessize.csv

Export all email addresses from specific Disitribution Group in CSV.

Get-DistributionGroup -Identity <"DistributionGroup Name" | GetDistributionGroupMember | select name,primarysmtpaddress >C:\Powershell-Exports\dg.txt

If you are intresting to export Reports from Active Directory download our Powershell Tool to do it.

Find some intresting articles that maybe want to read.

Use Powershell to export Reports from Active Directory Use WMI with Powershell to Discover Monitor Information Monitoring Domain Controller Health Status with PowerShell

That's it for now.

I will come back next week with new commands.

Do your comments or ask anything that you want here or send me an email in info@askme4tech.com . I will be here to answer your questions.

No comments: