OneScript Team Blog

A world of automation script samples based on IT Pros' real-world tasks

[Script of Apr. 23] Move Multiple Email Messages to a Specific Folder in Office 365 Exchange Online

[Script of Apr. 23] Move Multiple Email Messages to a Specific Folder in Office 365 Exchange Online

  • Comments 1
  • Likes

Script Download:NewOSCEXOAppointment.zip
http://gallery.technet.microsoft.com/scriptcenter/Move-Multiple-Email-e2bd1e7d/

This script demonstrates how to move multiple email messages to a specific folder in Office 365 Exchange Online. You can use this script to search email messages that meet specified search criteria and then move these email messages to a specific folder.

Currently, you have limitations when moving multiple email messages by using Outlook Web App (OWA). Although, you may already set up inbox rules to manage your email messages, but you still find you need a script to move multiple email messages in a regular manner.

image image
image

You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Hi, thanks for sharing your script - it gives me a good starting point on how to use EWS. However, there are some issues I noticed and had to correct when trying to use it out of the box:

    1. the name of script and the zip/folder do not match. So it is not possible to load it directly via Import-Module from your PSModulePath

    2. The Search-OSCEXOEmailMessage Cmdlet does not return S/MIME signed mail messages from a folder.

    3. You have redundant functions like Search-OSCEXOEmailMessage within different modules like Send-OSCEXOEmailMessage/Move-OSCEXOEmailMessage/Export-OSCEXOEmailMessage. How do you intend to keep them at the same revision? Wouldn't it be easier to either have a base module with base functionality or to have just one module for all you functions of the same topic? Cheers, Ronald