Searching 3 shared mailboxes for keywords from CSV RRS feed

  • Question

  • I have been tasked with searching three shared mailboxes in our Office 365 environment for keywords that are listed in an one column excel document. The list is comprised of 3.6K loan numbers that I need to search emails against that contain them.  Once I have the emails that contain any of the 3.6K keywords, I need to sort the emails into folders that are named the same as the keyword, essentially having 3.6K folders as well.

    I am assuming this is needing to be done in Powershell.

    Is anyone able to throw together a quick script that might help me?

    Thank you!

    • Moved by Steve Fan Thursday, August 3, 2017 6:36 AM
    Wednesday, August 2, 2017 1:37 PM

All replies

  • Hi Kyle,

    Welcome to the Office 2016 and Office 365 ProPlus IT Pro General Discussions forum. This forum is for general questions and feedback related to Office desktop applications. Since your request is more related to script, I'll move it to a more appropriate forum:

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    Steve Fan

    Please remember to mark the replies as answers if they helped.

    If you have feedback for TechNet Subscriber Support, contact

    Thursday, August 3, 2017 6:36 AM
  • Hi Kyle Walser,
    Where are the loan number? Subject? Body? Recipients? If they are shown in specific field, you could use Items.Restrict or Items.Find to loop to find the number in the loan number list. After find the email, we could use the Move method to move the email to another folder. What type items will you search? Where are the 3.6k folders? I suggest you provide details so we could reproduce your issue. Besides, I think it will be large burden to search for 3.6k words and move mails to 3.6k folders. What's your purpose to do this?
    Best Regards,
    Terry Xu
    Monday, August 7, 2017 10:25 AM