main logo

How to Change Exchange Online Deleted Items Retention Period

Retention Period

Exchange Online, part of Microsoft 365, allows organizations to manage email retention policies effectively. By default, items deleted by users are retained in the Recoverable Items\Deletions folder for 14 days. However, some businesses may need to extend this retention period to the maximum of 30 days to comply with data recovery policies and legal requirements.

This guide provides a step-by-step explanation of how to change the retention period for deleted items in Exchange Online to 30 days using PowerShell commands.

Why Change the Deleted Items Retention Period?

Extending the deleted items retention period can be beneficial for:

  • Accidental Deletion Recovery: Provides additional time to recover mistakenly deleted emails.
  • Compliance Requirements: Ensures compliance with data retention and legal hold policies.
  • Backup Supplementation: Acts as a short-term backup alternative in case of email data loss.
  • User Convenience: Allows users more time to retrieve important deleted messages.

Default Retention Policy in Exchange Online

  • Default Setting: 14 days.
  • Maximum Setting: 30 days.
  • Items are moved to the Recoverable Items\Deletions folder when deleted using Delete, Shift+Delete, or Empty Deleted Items Folder actions.

Prerequisites for Changing Retention Period

Before proceeding, ensure the following:

  1. Administrative Permissions: You must have Exchange Administrator or Global Administrator privileges.
  2. PowerShell Module for Exchange Online: Install and configure the Exchange Online Management module.
  3. Multi-Factor Authentication (MFA): Enabled and configured for secure access.

Step 1: Connect to Exchange Online PowerShell

1. Open Windows PowerShell as an administrator.

2. Install the Exchange Online PowerShell module if it is not already installed:

Install-Module -Name ExchangeOnlineManagement

3. Import the module:

Import-Module ExchangeOnlineManagement

4. Connect to Exchange Online:

Connect-ExchangeOnline -UserPrincipalName admin@domain.com

    Step 2: View Current Retention Settings

    1. Check the current retention setting for a specific mailbox:

    Get-Mailbox -Identity user@domain.com | Select RetainDeletedItemsFor

    2. Review the output to confirm the current retention period in days.

      Step 3: Change Retention Period to 30 Days

      For a Single Mailbox:

      1. Update the retention period for one user:

      Set-Mailbox -Identity user@domain.com -RetainDeletedItemsFor 30

        For All Mailboxes:

        1. Apply the change across all mailboxes:

        Get-Mailbox -ResultSize Unlimited | Set-Mailbox -RetainDeletedItemsFor 30

        2. Confirm that changes are applied successfully.

          Step 4: Verify Changes

          1. Check the updated setting for the mailbox:

          Get-Mailbox -Identity user@domain.com | Select RetainDeletedItemsFor

          2. Ensure the output shows 30 days.

            Common Errors and Troubleshooting

            1. Permission Denied Error

            • Cause: Insufficient administrative rights.
            • Solution: Ensure the logged-in user has Exchange Administrator or Global Administrator permissions.

            2. Retention Period Not Updated

            • Cause: Command execution failed or mailbox not recognized.
            • Solution: Double-check mailbox identity and rerun the command.

            3. PowerShell Module Not Installed

            • Cause: Exchange Online Management module is missing.
            • Solution: Install the required module using:

            Install-Module -Name ExchangeOnlineManagement

            Best Practices for Managing Deleted Items Retention

            • Regular Audits: Periodically review retention settings to ensure compliance.
            • User Education: Train users to recover deleted items effectively.
            • Backup Planning: Combine retention policies with regular backups for added protection.
            • Retention Tags and Policies: Implement retention tags for automated cleanup and compliance.

            Benefits of Extending Retention Period

            • Data Protection: Safeguards against accidental or malicious deletions.
            • Compliance Support: Helps meet regulatory requirements for data retention.
            • Cost Efficiency: Reduces dependency on third-party email archiving tools.
            • Simplified Recovery Process: Allows IT admins to recover items without contacting support.

            Conclusion

            Changing the Exchange Online deleted items retention period to 30 days provides enhanced security, compliance, and recovery options for organizations. By following the steps outlined above, administrators can easily modify retention policies using PowerShell commands.

            For professional assistance with Microsoft 365 configurations, email retention policies, and Exchange Online management, contact Medha Cloud today.

            Contact Medha Cloud to optimize your Microsoft 365 setup.

            Benjamin Gbolaru
            Benjamin Gbolaru
            I'm Benjamin, a Microsoft 365 Specialist, helping small and large businesses deploy, configure, and secure M365 environments to maximize the benefits of Microsoft tools. With sound expertise in driving cloud adoption, identity and access management (IAM), security monitoring, system reliability, and proactive troubleshooting.
            Share
            Contents

            Related Articles

            medhacloud logo
            USA:
            Medha Cloud Solutions LLC
            30 N Gould St Ste R, Sheridan, WY 82801,
            Phone: +1 646 775 2855

            India:
            Medha Cloud Solutions Private Limited
            #74, 7th Cross, Krishna Garden InCity Layout. Chikka Kammanahalli, Banneraghatta Road, Bangalore 560083
            Phone:+91 93536 44646

            E-Mail: sales@medhahosting.com
            ©Medha Cloud 2024. All rights reserved.