Export (0) Print
Expand All

Set-RetentionPolicyTag

Applies to: Exchange Server 2010

Topic Last Modified: 2011-03-19

Use the Set-RetentionPolicyTag cmdlet to modify the properties of a retention tag.

For more information about retention tags, see Understanding Retention Tags and Retention Policies.


Set-RetentionPolicyTag -Identity <RetentionPolicyTagIdParameter> [-AddressForJournaling <RecipientIdParameter>] [-AgeLimitForRetention <Nullable>] [-Comment <String>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-JournalingEnabled <$true | $false>] [-LabelForJournaling <String>] [-LegacyManagedFolder <ADObjectId>] [-LocalizedComment <MultiValuedProperty>] [-LocalizedRetentionPolicyTagName <MultiValuedProperty>] [-MessageClass <String>] [-MessageFormatForJournaling <UseMsg | UseTnef>] [-MustDisplayCommentEnabled <$true | $false>] [-Name <String>] [-RetentionAction <MoveToDeletedItems | MoveToFolder | DeleteAndAllowRecovery | PermanentlyDelete | MarkAsPastRetentionLimit | MoveToArchive>] [-RetentionEnabled <$true | $false>] [-SystemTag <$true | $false>] [-Type <Calendar | Contacts | DeletedItems | Drafts | Inbox | JunkEmail | Journal | Notes | Outbox | SentItems | Tasks | All | ManagedCustomFolder | RssSubscriptions | SyncIssues | ConversationHistory | Personal | RecoverableItems>] [-WhatIf [<SwitchParameter>]]


Set-RetentionPolicyTag -Mailbox <MailboxIdParameter> [-Comment <String>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-LegacyManagedFolder <ADObjectId>] [-LocalizedComment <MultiValuedProperty>] [-LocalizedRetentionPolicyTagName <MultiValuedProperty>] [-MustDisplayCommentEnabled <$true | $false>] [-Name <String>] [-OptionalInMailbox <RetentionPolicyTagIdParameter[]>] [-SystemTag <$true | $false>] [-Type <Calendar | Contacts | DeletedItems | Drafts | Inbox | JunkEmail | Journal | Notes | Outbox | SentItems | Tasks | All | ManagedCustomFolder | RssSubscriptions | SyncIssues | ConversationHistory | Personal | RecoverableItems>] [-WhatIf [<SwitchParameter>]]

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.RetentionPolicyTagIdParameter

The Identity parameter specifies the name, distinguished name (DN), or GUID of the retention policy tag to be modified.

Mailbox

Required

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The Mailbox parameter specifies a mailbox for assigning opt-in tags.

Dd298042.important(en-us,EXCHG.140).gifImportant:
You must use this parameter with the OptionalInMailbox parameter.

AddressForJournaling

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter

This parameter isn't available in this release.

AgeLimitForRetention

Optional

System.Nullable

The AgeLimitForRetention parameter specifies the age at which retention is enforced on an item. The age limit corresponds to the number of days from the date the item was delivered, or the date an item was created if it wasn't delivered. If this parameter isn't present and the RetentionEnabled parameter is set to $true, an error is returned.

Comment

Optional

System.String

The Comment parameter specifies a comment for the retention policy tag.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory.

JournalingEnabled

Optional

System.Boolean

This parameter isn't available in this release.

LabelForJournaling

Optional

System.String

This parameter isn't available in this release.

LegacyManagedFolder

Optional

Microsoft.Exchange.Data.Directory.ADObjectId

The LegacyManagedFolder parameter isn't available in this release.

LocalizedComment

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The LocalizedComment parameter specifies the localized comment and language for the retention policy tag. This comment is displayed in Microsoft Outlook based on the user's locale.

LocalizedRetentionPolicyTagName

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The LocalizedRetentionPolicyTagName parameter specifies a localized name for the retention policy tag. This name is displayed in Outlook based on the user's locale.

MessageClass

Optional

System.String

The MessageClass parameter specifies the message type to which the tag applies. If not specified, the default value is set to *.

Exchange 2010 doesn't support retention tags for different message types. Only tags with a MessageClass of * are supported, and they apply to all message types.

MessageFormatForJournaling

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.JournalingFormat

This parameter isn't available in this release.

MustDisplayCommentEnabled

Optional

System.Boolean

The MustDisplayCommentEnabled parameter specifies whether the comment can be hidden. The default value is $true.

Name

Optional

System.String

The Name parameter specifies the name of the retention policy tag.

OptionalInMailbox

Optional

Microsoft.Exchange.Configuration.Tasks.RetentionPolicyTagIdParameter[]

The OptionalInMailbox parameter is used with the Mailbox parameter to specify opt-in retention tags available to the mailbox.

RetentionAction

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.RetentionActionType

The RetentionAction parameter specifies one of the following actions:

  • Mark as past retention limit
  • Move to a managed custom folder
  • Move to the Deleted Items folder
  • Delete and allow recovery
  • Permanently delete

If this parameter isn't present and the RetentionEnabled parameter is set to $true, an error is returned.

RetentionEnabled

Optional

System.Boolean

The RetentionEnabled parameter specifies that retention is enabled when set to $true.

SystemTag

Optional

System.Boolean

The SystemTag parameter specifies whether the retention policy tag is created for internal Exchange functionality.

Type

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.ElcFolderType

The Type parameter specifies the type of retention policy tag being modified.

Valid values include:

  • Calendar
  • Contacts
  • DeletedItems
  • Drafts
  • Inbox
  • JunkMail
  • Journal
  • Notes
  • Outbox
  • SentItems
  • Tasks
  • All
  • ManagedCustomFolder
  • RssSubscriptions
  • SyncIssues
  • ConversationHistory
  • Personal
Dd298042.note(en-us,EXCHG.140).gifNote:
To create a default tag, specify All.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

Retention tags are used to apply message retention settings to folders and items in a mailbox.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Messaging records management" entry in the Messaging Policy and Compliance Permissions topic.

Error Description

 

 

This example changes the comment for the AllUsers-DeletedItems retention policy tag.

Set-RetentionPolicyTag "AllUsers-DeletedItems" -Comment "Items in the Deleted Items folder will be automatically deleted in 120 days"

This example makes optional retention tags available to user Terry Adams using the Mailbox and OptionalInMailbox parameters.

Set-RetentionPolicyTag -Mailbox "Terry Adams" -OptionalInMailbox "ProjectA","ProjectB"
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft