Connect to Exchange Online:
Connect-ExchangeOnline
Enable Auto-Expanding Archiving:
Use the Enable-Mailbox cmdlet to enable auto-expanding archiving for the specified mailbox:
Enable-Mailbox -Identity <MailboxIdentity> -AutoExpandingArchive
Verify Auto-Expanding Archiving:
Get-Mailbox -Identity <MailboxIdentity> | Select-Object AutoExpandingArchive