Connect to Exchange Online PowerShell
Exchange Online PowerShell Modunle
You need install Exchange Online module only once. In the next time, run to connect to Exchange Online PowerShell.
##Connect to Exchange Online Powershell.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force;
Install-PackageProvider -Name NuGet -Force;
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted;
Install-Module -Name ExchangeOnlineManagement;
Import-Module ExchangeOnlineManagement;
Connect-ExchangeOnline;
Get-OrganizationConfig | FL AutoExpandingArchiveEnabled
Enable mailbox archiving for a single mailbox
Enable-Mailbox <user mailbox> -AutoExpandingArchive
Enable auto expanding for all mailboxes
Set-OrganizationConfig -AutoExpandingArchive
5/5 - (1 vote)