# Auto-Expanding Archive (Exchange Plan 2)

A full guide to this process can be found here - [https://learn.microsoft.com/en-us/purview/enable-autoexpanding-archiving](https://learn.microsoft.com/en-us/purview/enable-autoexpanding-archiving)   
  
<span style="color: rgb(224, 62, 45);">USER MUST HAVE EXCHANGE ONLINE PLAN 2 LICENCE **<span style="text-decoration: underline;">BEFORE</span>** COMPLETING THESE STEPS   
  
<span style="color: rgb(0, 0, 0);">**The steps have to be done in order or this won't work**</span>  
  
</span>Most clients have predefined retention policy's but if you need to create a new one, follow this guide: <span style="text-decoration: underline;"><span style="color: rgb(53, 152, 219); text-decoration: underline;">[https://learn.microsoft.com/en-us/exchange/security-and-compliance/messaging-records-management/create-a-retention-policy](https://learn.microsoft.com/en-us/exchange/security-and-compliance/messaging-records-management/create-a-retention-policy)  
  
</span></span>STEPS TO COMP  
  
Step 1: - Head to office 365 admin tenant &amp; access Exchange Admin Centre   
  
Step 2: Turn on In-Place Archive for the affected user and call it "(User's name) Archive" (This is under Mailbox in the user settings in exchange)   
  
Step 3: Open Powershell and run - Connect-ExchangeOnline then log in with appropriate 365 tenant admin account   
  
If you can't run Connect-ExchangeOnline - try these:   
  
[https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.5](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.5) (set execution policy unrestricted)   
  
[https://learn.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps](https://learn.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps) (Import exchange module)   
  
Step 4: Once logged in, run the command Enable-Mailbox "User Email Address" -autoexpandingarchive

Step 5: Confirm with the user how long they want before archiving takes place (typically 2 years, will need to create a new retention policy for longer)

Step 6: Navigate to the user in Exchange admin centre and select the appropriate retention policy (this is under Other in exchange and we be set as Default RMM policy originally)