Exchange Power Shell Script To Search a Mailbox

Posted on 2011-04-27
Last Modified: 2012-05-11
I need an Exchange PS script that’s able search through mailbox content for certain words?  
Question by:vhaperbaugub
    LVL 9

    Expert Comment

    Check below URL with some of the shell commands,
    LVL 9

    Expert Comment

    LVL 12

    Accepted Solution

    The closest thing I know of using Powershell is the Export-mailbox cmdlet. Basically, you would export every message that contains a specific keyword to a pst file or to another mailbox. The command to a pst would look as follows: (make sure you are running powershell under an account that has access to the mailbox you are wanting to export)
    Export-Mailbox -id mailboxalias -PstFolderPath "c:\pstfiles" -AllContentKeywords "String you are looking for" -GlobalCatalog ""

    Open in new window

    Replace mailboxalias with the mailbox you are wanting to search through. Replace c:\pstfiles with the path where you want to save the pst file, replace "string you are looking for" with the string you are looking for and replace with the fqdn of a global catalog server to search through.

    Featured Post

    Want to promote your upcoming event?

    Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

    Join & Write a Comment

    Suggested Solutions

    Get an idea of what you should include in an email disclaimer with these Top 5 email disclaimer tips.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now