I’ve been doing a large migration lately which has involved configuring all users with an Archive mailbox, setting the retention policy and moving items past retention into the Archive databases.
The users primary mailbox would reside on SAS disk while the archive databases were being stored on cheaper SATA disk.
The “Default Archive Policy” of moving items older than 2 years into the Online Archive would be used
The high level steps for this were as follows.
- Enable the users for archive
- Setting the archive database and enabling the retention policy
- Testing move of mail items past retention into the Archive database
As there were several thousand users on the system the only sensible way to achieve this was through the shell.
The users were already broken in 14 databases so naturally I approached this on a per database.
The following shell commands were used
Get-MailboxDatabase (DBName) | Get-Mailbox | Enable-Mailbox –Archive
Get-MailboxDatabase (DBName) | Get-Mailbox | Set-Mailbox –ArchiveDatabase (ArchiveDBName) –RetentionPolicy “Default Archive Policy”
Get-MailboxDatabase (DBName) | Get-Mailbox | Start-ManagedFolderAssistant
The Managed Folder Assistant runs nightly, however I used the above command to kick the process off immediately and verify that data was indeed moving to the new Archive DB