Apply PersonalTags to CustomFolders – Exchange 2013

Posted: August 11, 2015 in Exchange 2013
Tags: , , , , , , , , ,

Hi folks,

with Exchange 2013 ManagedFolders are no longer supported. This feature has been replaced by RetentionTags and RetentionPolicies.
The central management of custom folders is made more diffcult. The local user can apply the RetentionPolicies manual. A workarround for centralized management is the use of Exchange Web Services.

$getRTResp=$service.GetUserRetentionPolicyTags();
foreach ($rtTagin$getRTResp.RetentionPolicyTags) {
if ($rtTag.DisplayName-eq”1 Month Delete”)
{
$NewFolder=new-objectMicrosoft.Exchange.WebServices.Data.Folder($service)
$NewFolder.DisplayName=”My New Folder12345″
$NewFolder.FolderClass=”IPF.Note”
$NewFolder.PolicyTag=New-Object
Microsoft.Exchange.WebServices.Data.PolicyTag($true,$rtTag.RetentionId)
$NewFolder.Save($folderid)
}
}

This is an example how to create a new folder and set the RetentionPolicyTag on that folder to a UserRetentionPolicyTag called “1 Month Delete”.

(Source: MSDN Blog)

Cheers,

Chris

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s