This text provides a step-by-step guide to “Mailbox Expansion and Archiving in Exchange Online”. It begins by setting up the PowerShell execution policy and security protocol. Next, install and import the “ExchangeOnlineManagement” module. After establishing a connect to exchange online powershell, the text describes how to start the Managed Folders Wizard for It services for a specific mailbox and how to enable automatic expansion archiving for a mailbox. These commands allow administrators to efficiently manage mailboxes and apply message retention policies. To get started we must follow the steps below:
Let´s use Commands in windows for exchange online:
Then, we execute the following commands:
Set-ExecutionPolicy RemoteSigned
This command changes the execution policy in your exchange online Powershell session to allow scripts to run. “RemoteSigned” is one of the policies you can set and means that all scripts downloaded from the internet must be signed by a trusted publisher.

Select the option [A] Yes to All

This command updates the IT support services security protocol to TLS 1.2. It is useful when you are interacting with services that require this level of security.
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

This command installs the “ExchangeOnlineManagement” module from the exchange online powershell repository.
Install-Module -Name ExchangeOnlineManagement (Select A for yes to all or Y for Yes)


This command imports the “ExchangeOnlineManagement” module into your current PowerShell session so you can use its cmdlets.
Import-Module ExchangeOnlineManagement


This command allows you to log in to Exchange Online with your global administrator credentials.
Connect-ExchangeOnline (sign in with the global admin credential)
Specify your Mailbox:

This command starts the Managed Folder Wizard for the specified mailbox. This wizard applies retention policies to the folders in the mailbox.
Start-ManagedFolderAssistant -Identity “put in the users mailbox”


This command starts the Managed Folder Wizard for the IT support and services specified mailbox. This wizard applies retention policies to the folders in the mailbox.
Start-ManagedFolderAssistant -Identity “put in the users mailbox”