Link to home
Start Free TrialLog in
Avatar of vmich
vmichFlag for United States of America

asked on

Easiest way to extract certian emails from exchange 2013 database

I think I had this question here before but we need to extract emails from our exchange 2013 database but the logs are set for 30 days. So I need to get the emails for a  certain user outside of our organization that have sent to our organization.
So what is the best way to do this?
Avatar of Chris
Chris
Flag of United Kingdom of Great Britain and Northern Ireland image

If you only have exchange tools to hand i.e. no 3rd party software then Search-mailbox function is your best plan
you can use it to search all mailboxes and remove the mail items

here is the technet article for using it
https://technet.microsoft.com/en-GB/library/ff459253(v=exchg.150).aspx

or a fairly concise blog article
https://www.codetwo.com/admins-blog/how-to-delete-email-from-mailboxes-on-exchange-2016-2013-2010-online/

if you have specifics you are stuck on then give a bit more details and i can put a command together
Avatar of vmich

ASKER

Chris,
Ok I need to gather emails sent to and received from 1/1/2016 to present to a certain external domain.
ASKER CERTIFIED SOLUTION
Avatar of Marshal Hubs
Marshal Hubs
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Vmich,

You can do this easily from PowerShell using a command like this:

Search-Mailbox -Identity "FirstName LastName" -SearchQuery 'From:sendername@example.com Subject:"Test1 Test2 Test3" sent:01/01/2016..01/01/2018' -TargetMailbox "Search Mailbox" -TargetFolder "Search Folder" -LogLevel Full

Open in new window



Alan.
Only one addition i would make to that, on the assumption you want to search all mailboxes

add this in front of the command Alan has given

Get-Mailbox  -ResultSize Unlimited |
It can be done by PowerShell command but one should be aware with it. Further to extract emails from that specific user within specified from Exchange server 2013 database file. Look into https://www.experts-exchange.com/articles/31049/Export-Exchange-2013-EDB-Mailbox-to-PST.html where one method is explained.
Else if you have the Exchange 2013 database file, then you can directly export emails of user to PST by using Kernel for EDB to PST Converter tool. Visit https://www.nucleustechnologies.com/edb-to-pst.html to know more about the software and process.
Avatar of vmich

ASKER

I got the issue resolved via Digi Scope product
Hi Vmich,

If you already had that product installed, then fair enough, but for what its worth, I would never install any third party software on an Exchange Server, and especially not something that replicates functionality that is already built in.

However, glad to hear you got it resolved.  


Alan.
Avatar of vmich

ASKER

Well we had no choice Alan because with the logs being set at 30 days. we were not able to create any pst files from it further back than 30 days.
Is there a way to do this or is 30 days the furthest we can go back because of the logs?
Are you saying that the above built-in command did not work?

I was really only posting here so that others that may follow are not installing unnecessary software on their servers.

If you had already paid out the cash and installed the software, your situation was already

Thanks,

Alan.
Avatar of vmich

ASKER

Alan,
I guess I am confused on this..
I needed to be able to extract emails from the dbs for a period from 1-1-2016 to present. So I thought that I could not since our exchange logs were set to 30 days.
Is there a way that I can get this data to a PST file from exchange for the time period I mentioned and if so, how do I do that?
Thanks
Avatar of vmich

ASKER

I need to reassign this to one of the other authors not to myself
Thanks
Avatar of vmich

ASKER

Used 3rd party tool