Page 1 of 1

How to copy items from one mailbox folder to another mailbox folder using powershell

Posted: Wed Jan 11, 2017 2:03 pm
by island_guy
I understand that I can copy all or supply a query using AQS but I want to only copy the contents of a Exchange mailbox folder to another Exchange mailbox folder.

Search-Mailbox

The syntax I have is:

Search-Mailbox -Identity Identity.Mailbox@abc.com -TargetMailbox Target.Mailbox@abc.com -TargetFolder "CopyContents" -LogLevel Full -SearchQuery "Folderid=LgAA42AAsdhv9eC2323SL1s/w06La4b32QA07dXtZQ23dsT4aHrSX232dsAAAVroAOAAAB AND kind:email"

And it works saying it copied 1 item(s). Just not the item I expect. The resulting item is from a different folder object. The conversation folder where I used the same ID to converse with a coworker about the ID. I expected it to only reference the folder ID that equals what was supplied but instead matched the string of the ID to an email... (kind:email) I only want it to look in the object folder ID and copy the contents.

Does anybody have anything else they can share or point out.

Thank you.