Office 365 hybrid: Enabling In-Place archive with Powershell
There are lot of articles out there describing how to enable In-Place archive in hybrid mode. None of them actually have a solution to bulk enable In-Place archive on mailboxes that don't have an in-place archive.
The below script reads all remote mailboxes, check if in-place archive is already enabled, and if not enables it.
Get-RemoteMailbox -ResultSize Unlimited -Filter {ArchiveState -eq 'none'} | Enable-RemoteMailbox -Archive
If you are looking to enable in-place archive for one user:
Get-RemoteMailbox jim.thomas@domain.com | Enable-RemoteMailbox -Archive
To check the status of a user:
Get-RemoteMailbox jim.thomas@domain.com | Fl *archive*
ArchiveState changes to "HostedPending" state soon after enabling in-place archive and then changes to "HostedProvisioned" after some time, once directory sync and archive mailbox provisioning are complete.
Hope this is informative.