Export all e-mails from specific domain on Exchange 2010 server

I need to export all messages on my Exchange 2010 server that are to or from a certain domain.  Anything sent to or received from abcdomain.com for example.   In years past Exmerge was the ticket for this but everything is PowerShell now.  Can someone help me figure out how to accomplish this with powershell?  I understand this will only find messages still existing and nothing that has been deleted which is fine.  I just need to find anything we have sitting on the server to or from this address.  

Thank you.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

AmitIT ArchitectCommented:
You can use search mailbox ps command. Check this KB
Will SzymkowskiSenior Solution ArchitectCommented:
Use the following script below to accomplish this...
Get-Mailbox -ResultSize "unlimited" | 
Search-Mailbox -SearchQuery 'Sender:"*@abcdomain.com" and Recipient:"*abcdomain.com"' -TargetMailbox "Administrator" -TargetFolder "TestSearch" -Loglevel Full

Open in new window

bguilliams100Author Commented:
I ended up using the tools in the Exchange Management console to perform the searches.  I will have to adopt PowerShell sooner or later I know.

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
bguilliams100Author Commented:
I didn't use the suggested solutions which were all via PowerShell.  I used the Tools in the Exchange Management console.
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

From novice to tech pro — start learning today.