powershell excport-mailbox text file with search criteria
I'm trying to write a script that will use export-mailbox -AllContentKeyWords to search multiple mailboxes for muiltiple criteria. I have about 4 subjects that I need to search for, I will use the -allcontentkeywords just in case it isn't in
the subject. I have a text file with the list of mailboxes to be searched and I have a text file with content to search for but I don't know how to format the text file for content. Do I seperate it by semicolon or linebreak...???
August 25th, 2011 9:01pm
Hi The_Messenger,
You could use the comma. LIKE
-allcontentkeywords "a","b"
But the identity could not use the comma to contains multiple mailbox, then you could use
Import-csv to import the csv, and then use export-mailbox do it with foreach.
Regards!
Gavin
TechNet Subscriber Support
in forum
If you have any feedback on our support, please contact
tngfb@microsoft.com
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if
a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2011 6:19am
Thanks Gavin, commas worked.
I used a csv file for the subjects and for the usernames.
August 26th, 2011 9:06am