2

I'm trying to move the content of one folder in Exchange Online to the 'In-Place Archive'. As I have to do this for different folder for different users I was thinking of doing it with Powershell Search-Mailbox but I can´t find the proper path to put in -TargetMailbox

Could you point it out?

Ezeq
  • 53
  • 3
  • 7
  • What criteria are you trying to use? It's more typical to create a retention policy at the mail box level, or create retention tags and apply them to individual messages or folders. – longneck Apr 23 '19 at 13:37
  • For what I could read retention tags can take some time until they are effectively in production, and in this case I just want to help users to move the content of folder indicated by them to archive. So the criteria will be the user choice. – Ezeq Apr 25 '19 at 21:52

3 Answers3

1

Be careful with 'In-Place Archive'. There is no way to get folders back programmatically.

Docs (https://docs.microsoft.com/en-us/graph/api/resources/mail-api-overview?view=graph-rest-1.0):

Graph API does not support accessing in-place archive mailboxes, not on Exchange Online nor on Exchange Server.

This means that you have one-way road. You can place messages and folders in 'In-Place Archive', but we cannot find a way to access it those archived folders.

We broke our teeth on this (https://4bis.nl/en/blog-updates/4bis-software/2019/05/01/quote-manager-what-is-it-and-why-do-you-need-it this tool).

If anybody has ideas about this, please, don't be a stranger. See also: https://docs.microsoft.com/en-us/answers/questions/86478/collect-inplace-archives-mail-folder-from-exhange.html

1

As far as I know, it couldn’t simply use “search-mailbox” to move items to in-place archive mailbox, I found a script using EWS API, you could try it: https://gallery.technet.microsoft.com/scriptcenter/Move-emails-to-Archive-or-5394bb0d

In addition, I think it is better to use retention policy to move items to in-place archive.

Shaw
  • 339
  • 1
  • 4
  • Thank you Shaw, by the initial reading this is what I was looking for. I also believe that retention policies work well, but this is for a very particular situation as I told @longneck in reply to the comment on the question. – Ezeq Apr 25 '19 at 21:56
0

FYI: Reading up on the Search-Mailbox, and it looks like Microsoft is deprecating the Search-Mailbox cmdlet in cloud-based environments (Exchange Online) in favor of New-Compliance Search

djdomi
  • 1,377
  • 3
  • 10
  • 19
bradm413
  • 1
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 10 '22 at 17:57