New-ManagedContentSettings (RTM)
Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.
Applies to: Exchange Server 2007
Use the New-ManagedContentSettings cmdlet to create new managed content settings for managed folders.
Syntax
New-ManagedContentSettings -Name <String> -FolderName <ELCFolderIdParameter> -MessageClass <String> [-AddressForJournaling <RecipientIdParameter>] [-AgeLimitForRetention <Nullable>] [-DomainController <Fqdn>] [-JournalingEnabled <$true | $false>] [-LabelForJournaling <String>] [-MessageFormatForJournaling <UseMsg | UseTnef>] [-MoveToDestinationFolder <ELCFolderIdParameter>] [-RetentionAction <MoveToDeletedItems | MoveToFolder | DeleteAndAllowRecovery | PermanentlyDelete | MarkAsPastRetentionLimit>] [-RetentionEnabled <$true | $false>] [-TemplateInstance <PSObject>] [-TriggerForRetention <WhenDelivered | WhenMoved>]
Detailed Description
Managed content settings are settings that you apply to managed folders to control the lifespan of items in users' mailboxes. Lifespan is controlled in the following ways:
By controlling content retention and removing content that is no longer needed.
By automatically journaling important content to a separate storage location outside the mailbox.
For more information about managed content settings, see Managing Messaging Records Management.
To run the New-ManagedContentSettings cmdlet, the account you use must be delegated the following:
- Exchange Organization Administrator role
For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
FolderName |
Required |
Microsoft.Exchange.Configuration.Tasks.ELCFolderIdParameter |
The FolderName parameter specifies the name or GUID of the managed folder to which the managed content settings apply. |
MessageClass |
Required |
System.String |
The MessageClass parameter specifies the message type to which any expiration and journaling configuration settings within these content settings apply. The parameter value can be a well-known message type such as Calendar items, a specific message class such as IPM.NOTE.SMIME, or a custom message class. Well-known message types include the following:
Valid parameter values for custom message classes include:
Note When wildcard characters are used, these policies apply only to message classes that do not have a specific content setting. Therefore, IPM.NOTE.SMIME overrides IPM.NOTE.* Note Specific settings supersede general settings. For example, Voice Mail supersedes All Mailbox Content. |
Name |
Required |
System.String |
The Name parameter specifies a unique name for the managed content settings. |
AddressForJournaling |
Optional |
Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter |
The AddressForJournaling parameter specifies the address of the repository that will be the destination of the journaling operation. If this parameter is not present and the JournalingEnabled parameter is set to $true, an error is returned. |
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 was not delivered. If this parameter is not present and the RetentionEnabled parameter is set to $true, an error is returned. |
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration information to the Active Directory directory service, include the DomainController parameter in the command. |
JournalingEnabled |
Optional |
System.Boolean |
The JournalingEnabled parameter indicates that journaling is enabled when it is set to $true. |
LabelForJournaling |
Optional |
System.String |
The LabelForJournaling parameter specifies a label that will be attached to an item. This label will be used by the destination store to determine the content of the item and enforce the appropriate policy. |
MessageFormatForJournaling |
Optional |
Microsoft.Exchange.Data.Directory.SystemConfiguration.JournalingFormat |
The MessageFormatForJournaling parameter enables the administrator to specify that an item should be journaled in the Microsoft Outlook .msg format or in the traditional Outlook MAPI format. |
MoveToDestinationFolder |
Optional |
Microsoft.Exchange.Configuration.Tasks.ELCFolderIdParameter |
The MoveToDestinationFolder parameter specifies the destination folder of a move action. The destination folder must be an existing managed custom folder. If it is not, an error is returned. If the MoveToDestinationFolder parameter is not present and the retention action is MoveToFolder, an error is returned. |
RetentionAction |
Optional |
Microsoft.Exchange.Data.Directory.SystemConfiguration.RetentionActionType |
The RetentionAction parameter specifies one of the following actions:
If this parameter is not 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 it is set to $true. |
TemplateInstance |
Optional |
System.Management.Automation.PSObject |
When an existing object is supplied to the TemplateInstance parameter, the command uses the configuration of that object to create an exact duplicate of the object on a local or target server. |
TriggerForRetention |
Optional |
Microsoft.Exchange.Data.Directory.SystemConfiguration.RetentionDateType |
This TriggerForRetention parameter indicates the start date that will be used as the start of the retention period. An item can reach its retention limit a specific number of days after the item was delivered or after it was moved into a specific folder. This value corresponds to the 0x4 bit of the msExchELCFlags attribute in Active Directory. The flag is set to $true if the item will expire based on the date it was moved and $false if the item will expire based on the delivery date. If this parameter is not present and the RetentionEnabled parameter is set to $true, an error is returned. |
Input Types
Return Types
Errors
Error | Description |
---|---|
|
Exceptions
Exceptions | Description |
---|---|
|
Example
In the first example, the New-ManagedContentSettings command is used to create managed content settings of the Calendar message class and named MyCalendarContentSettings. The managed content settings apply to the default folder Calendar. Retention is enabled, and items are moved to the Deleted Items folder after 30 days.
In the second example, stubs (of a custom message class named IPM.Note.Archive.Shortcut) for archived content in user Inboxes are deleted with the managed content setting named RemoveArchiveStubs.
For more information about custom message classes, see the "MessageClass" parameter description in this topic and the "About message classes" section of Microsoft Knowledge Base article 241235, How to globally change the default forms in Outlook by using the Forms Administrator utility.
New-ManagedContentSettings -FolderName Calendar -MessageClass Calendar -Name MyCalendarContentSettings -RetentionEnabled $true -RetentionAction MoveToDeletedItems -AgeLimitForRetention "30"
New-ManagedContentSettings -FolderName Inbox -MessageClass IPM.Note.Archive.Shortcut -Name RemoveArchiveStubs -RetentionEnabled $true -RetentionAction MoveToDeletedItems -AgeLimitForRetention "1"