Announcement

Collapse
No announcement yet.

Powershell copy messages from one (or all mailboxes to another) Syntax?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Powershell copy messages from one (or all mailboxes to another) Syntax?

    I'm trying to copy all messages with a certain subject to an Archive mailbox for todays date. I can alter the date for scheduling this to run once a day but the problem I can't figure out is I need the messages copied to the inbox of the Archive account. This command (as close to getting this to work as I've come) put them in a sub folder of the inbox then another sub folder called Primary mailbox, then a folder called inbox. Is there any Powershell syntax tgat would copy these messages to the archive inbox?

    Get-Mailbox All users | Search-Mailbox -SearchQuery {Subject:"Message From*" AND sent:"5/2/2016"} -TargetMailbox "[email protected]" -TargetFolder "inbox"

  • #2
    You don't say which Exchange version it is, but you could look at the scripts here for ideas:
    https://blogs.msdn.microsoft.com/eme...users-mailbox/
    http://www.anexinet.com/blog/bulk-mo...-primary-mb-2/
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Sorry its hosted Exchange with Office 365

      Comment

      Working...
      X