Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2
Topic Last Modified: 2012-11-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.
Syntax
Set-RetentionPolicyTag -Identity
<RetentionPolicyTagIdParameter> [-AddressForJournaling
<RecipientIdParameter>] [-AgeLimitForRetention
<EnhancedTimeSpan>] [-Comment <String>] [-Confirm
[<SwitchParameter>]] [-DomainController <Fqdn>] [-Force
<SwitchParameter>] [-JournalingEnabled <$true |
$false>] [-LabelForJournaling <String>]
[-LegacyManagedFolder <ELCFolderIdParameter>]
[-LocalizedComment <MultiValuedProperty>]
[-LocalizedRetentionPolicyTagName <MultiValuedProperty>]
[-MessageClass <String>] [-MessageFormatForJournaling
<UseMsg | UseTnef>] [-MustDisplayCommentEnabled <$true |
$false>] [-Name <String>] [-RetentionAction
<MoveToDeletedItems | MoveToFolder | DeleteAndAllowRecovery |
PermanentlyDelete | MarkAsPastRetentionLimit | MoveToArchive>]
[-RetentionEnabled <$true | $false>] [-RetentionId
<Guid>] [-SystemTag <$true | $false>] [-WhatIf
[<SwitchParameter>]]
|
Set-RetentionPolicyTag -Mailbox
<MailboxIdParameter> [-Comment <String>] [-Confirm
[<SwitchParameter>]] [-DomainController <Fqdn>] [-Force
<SwitchParameter>] [-LegacyManagedFolder
<ELCFolderIdParameter>] [-LocalizedComment
<MultiValuedProperty>] [-LocalizedRetentionPolicyTagName
<MultiValuedProperty>] [-MustDisplayCommentEnabled <$true
| $false>] [-Name <String>] [-OptionalInMailbox
<RetentionPolicyTagIdParameter[]>] [-RetentionId
<Guid>] [-SystemTag <$true | $false>] [-WhatIf
[<SwitchParameter>]]
|
Detailed Description
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.
Parameters
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.
|
||
AddressForJournaling |
Optional |
Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter |
This parameter isn't available in this release. |
||
AgeLimitForRetention |
Optional |
Microsoft.Exchange.Data.EnhancedTimeSpan |
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
|
||
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. |
||
Force |
Optional |
System.Management.Automation.SwitchParameter |
The Force switch overrides the confirmation prompt displayed by the cmdlet when you use the RetentionId parameter. |
||
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.Configuration.Tasks.ELCFolderIdParameter |
The LegacyManagedFolder parameter specifies the name of a managed folder. The retention tag is created by using retention settings from the managed folder and its managed content settings. You can use this parameter to create retention tags based on existing managed folders to migrate users from managed folder mailbox policies to retention policies. |
||
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 With the exception of a default policy tag (DPT) for
To create a DPT for voice mail messages, set the
MessageClass parameter to
|
||
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
|
||
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:
If this parameter isn't present and the RetentionEnabled
parameter is set to |
||
RetentionEnabled |
Optional |
System.Boolean |
The RetentionEnabled parameter specifies whether the tag
is enabled. When set to
When you set the RetentionEnabled parameter to
|
||
RetentionId |
Optional |
System.Guid |
The RetentionId parameter specifies an alternate tag ID to ensure the retention tag found on mailbox items tagged in one Exchange organization matches the tag when the mailbox is moved to another Exchange organization (for example, in a cross-forest deployment or in a cross-premises deployment, when a mailbox is moved from an on-premises Exchange server to the cloud, or a cloud mailbox is moved to an on-premises Exchange server).
|
||
SystemTag |
Optional |
System.Boolean |
The SystemTag parameter specifies whether the retention policy tag is created for internal Exchange functionality. |
||
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. |
Input Types
To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.
Return Types
To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.
Examples
EXAMPLE 1
This example changes the comment for the AllUsers-DeletedItems retention policy tag.
Copy Code | |
---|---|
Set-RetentionPolicyTag "AllUsers-DeletedItems" -Comment "Items in the Deleted Items folder will be automatically deleted in 120 days" |
EXAMPLE 2
This example makes optional retention tags available to user Terry Adams using the Mailbox and OptionalInMailbox parameters.
Copy Code | |
---|---|
Set-RetentionPolicyTag -Mailbox "Terry Adams" -OptionalInMailbox "ProjectA","ProjectB" |