PS Script to move all mail items from a mailbox to a network share

This topic contains 3 replies, has 3 voices, and was last updated by  Mark Prior 1 year, 8 months ago.

  • Author
  • #56750

    Mark Prior

    Has anyone ever tried this, not to sure its possible

    requirements are, each time a mail arrives (or at set intervals) to move the item to a network share.

    i can monitor the mailbox with MS Orchestrator so that each time an item arrives it would kick off a PS Script, however im unsure what commands to use to extract the mail if there are any at all ?


  • #56755


    I think the best way to export the e-mails then would be to export them to the *.eml format (MSG files are a outlook data format so there is no easy way to export with powershell).
    You should be able to find you answer (and parts for your script) here

  • #56792


    Are you wanting to save the emails or the attachments ?

    • #56794

      Mark Prior

      Thanks walter,

      @ Brett save the entire mails inc any attachments

You must be logged in to reply to this topic.