Link to home
Create AccountLog in
Exchange

Exchange

--

Questions

--

Followers

Top Experts

Avatar of wayy2be
wayy2be

Search accoss all mailboxes in Exchange 2007
I need to search for emails that have keywords in the subject line on our Exchange 2007 server. I tried the folowing PowerShell command but it gives me errors stating that it cannot create the folder exportedemail:

et-mailbox -server NameofMailboxServer | export-mailbox -TargetMailbox "NameofMailboxtoImportInto" -targetFolder exportedmail -SenderKeyWords "someone@somewhere.com"


I am trying to get the results in my mailbox, so I created the exportedemail folder, but it errors saying that it cannot be created. I have a few stores, do I need to tell it which store?  Thanks

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of AmitAmit🇮🇳

You have permission issue. First apply the permission and then try again. Same question, i have answered earlier. check it below

https://www.experts-exchange.com/questions/27214327/Remove-Specific-Message-from-Exchange-Database.html

Avatar of wayy2bewayy2be

ASKER

Is this the correct syntax for the permissions?

Get-Mailbox -Server EXCHSVR01 | Add-MailboxPermission -User Admin01 -AccessRights Fullaccess -InheritanceType all
 
then should I run the same command as above?



Avatar of AmitAmit🇮🇳

looks perfect

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of wayy2bewayy2be

ASKER

Will copies of the emails it finds be kept on the server as well as exported into the specified folder?  

Avatar of wayy2bewayy2be

ASKER

I am looking for someones name in the subject line of any email sent to anyone within our organization. Is my search command correct?

Get-mailbox -server NameofMailboxServer | export-mailbox -TargetMailbox "NameofMailboxtoImportInto" -targetFolder exportedmail -SenderKeyWords "someone@somewhere.com"

Also how far back does it search, I am guessing the entire mailbox and all respective folders of that mailbox? Does it do every store on the server?

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of wayy2bewayy2be

ASKER

I got it to work. Is there an option to have it look for a certain string in the body of an email? Thanks

ASKER CERTIFIED SOLUTION
Avatar of AmitAmit🇮🇳

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account
Exchange

Exchange

--

Questions

--

Followers

Top Experts

Exchange is the server side of a collaborative application product that is part of the Microsoft Server infrastructure. Exchange's major features include email, calendaring, contacts and tasks, support for mobile and web-based access to information, and support for data storage.