How to Apply Retention Tags to Non-Default Folders in Exchange Online
Shelly Bhardwaj
Product Marketer | Exchange Server & Office 365 Specialist | DZone & Medium Author | Active Member of Reddit & Microsoft Community
In Exchange Online, part of Microsoft 365, retention policies play a critical role in ensuring compliance with legal, regulatory, and organizational requirements. Retention tags are used to define how long items in a mailbox should be retained and what happens to them after that period. While applying retention tags to default folders such as Inbox, Sent Items, and Deleted Items is straightforward, many users face challenges when trying to apply retention tags to non-default folders.
In this article, we will guide you through the process of applying retention tags to non-default folders in Exchange Online, explain the key concepts behind retention policies, and provide troubleshooting steps in case issues arise.
What Are Retention Tags and Policies?
Before diving into the specifics of applying retention tags to non-default folders, let’s first understand what retention tags and policies are.
Exchange Online provides two types of retention tags:
Applying Retention Tags to Non-Default Folders in Exchange Online
By default, retention tags are applied to default system folders. However, you might want to apply a retention tag to non-default folders (e.g., project-specific folders, shared folders, or folders that users create themselves). To do so, you need to use a combination of PowerShell commands and the Exchange Admin Center (EAC) in Exchange Online. Here’s a step-by-step guide on how to apply retention tags to non-default folders.
Step 1: Define Retention Tags and Policies
Creating a Retention Tag
Create a Retention Policy
Step 2: Use PowerShell to Apply Retention Tags to Non-Default Folders
Once the retention tags are created, you can apply them to non-default folders using PowerShell. Exchange Online PowerShell provides a convenient way to manage mailbox retention tags on non-default folders that are not handled directly through the Exchange Admin Center (EAC).
Connect to Exchange Online PowerShell
First, you need to connect to Exchange Online using PowerShell. Follow these steps to authenticate:
领英推荐
List Available Folders in a Mailbox
To apply retention tags to non-default folders, you need to know the names of the folders in the mailbox. Use the following command to list the folders:
Get-MailboxFolder -Mailbox <user mailbox>
This will return a list of all folders in the user’s mailbox.
Apply a Retention Tag to a Non-Default Folder
Once you have identified the folder where the retention tag should be applied, you can use the following command to apply the retention tag:
Set-MailboxFolder -Identity "<user mailbox>:\<folder name>" -RetentionPolicy "<policy name>"
For example, if you want to apply the “Project Retention” policy to a folder named “Projects” in a user’s mailbox, use the following command:
Set-MailboxFolder -Identity "[email protected]:\Projects" -RetentionPolicy "Project Retention Policy"
This command assigns the specified retention policy to the “Projects” folder.
Step 3: Verify the Retention Tag Application
After applying the retention tag to the non-default folder, it’s important to verify that the tag has been applied successfully. To do this:
Step 4: Troubleshooting
If the retention tag does not appear to apply correctly or isn’t functioning as expected, here are a few troubleshooting steps:
Conclusion
Applying retention tags to non-default folders in Exchange Online is an essential task for organizations to maintain compliance and manage mailbox data effectively. While the process is not always straightforward, using a combination of the Exchange Admin Center (EAC) and PowerShell provides the flexibility needed to target specific folders and apply retention policies accordingly.
By following the steps outlined in this article, you can ensure that your organization’s retention requirements are met and that non-default folders are properly managed. If issues arise, the troubleshooting tips will help you resolve them efficiently and ensure smooth operation of your Exchange Online environment.