Commands › Exchange Online

Set-ManagedContentSettings

Exchange Online ExchangeOnlineManagement Set-*

Modify existing managed content settings for a managed folder.

Quick start script

# Set-ManagedContentSettings — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-ManagedContentSettings
$before | Format-List

# 3. Make the change (dry run first)
Set-ManagedContentSettings -Identity <ELCContentSettingsIdParameter> -WhatIf
Set-ManagedContentSettings -Identity <ELCContentSettingsIdParameter>

# 4. Verify and diff
$after = Get-ManagedContentSettings
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-ManagedContentSettings [-Identity] <ELCContentSettingsIdParameter>
 [-AddressForJournaling <RecipientIdParameter>]
 [-AgeLimitForRetention <EnhancedTimeSpan>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-JournalingEnabled <Boolean>]
 [-LabelForJournaling <String>]
 [-MessageFormatForJournaling <JournalingFormat>]
 [-MoveToDestinationFolder <ELCFolderIdParameter>]
 [-Name <String>]
 [-RetentionAction <RetentionAction>]
 [-RetentionEnabled <Boolean>]
 [-TriggerForRetention <RetentionDateType>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (14)

ParameterTypeRequiredWhat it controls
-Identity ELCContentSettingsIdParameter yes The Identity parameter specifies the name, distinguished name (DN), or GUID of the managed content settings.
-AddressForJournaling RecipientIdParameter The AddressForJournaling parameter specifies the journaling recipient where journaled messages are sent. You can use any value that uniquely identifies the recipient. For example:
-AgeLimitForRetention 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 that the item was delivered or the date that an item was...
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-JournalingEnabled Boolean The JournalingEnabled parameter specifies that journaling is enabled when it's set to $true.
-LabelForJournaling String The LabelForJournaling parameter specifies a label that's attached to an item. This label is used by the destination store to determine the content of the item and enforce the appropriate policy.
-MessageFormatForJournaling JournalingFormat The MessageFormatForJournaling parameter specifies the format in which an item should be journaled in. You can use the following values:
-MoveToDestinationFolder ELCFolderIdParameter The MoveToDestinationFolder parameter specifies the name of the destination folder for a retention action.
-Name String The Name parameter specifies a unique name for the managed content settings.
-RetentionAction RetentionAction The RetentionAction parameter specifies one of the following actions to take when an item reaches its retention age limit, specified by the AgeLimitForRetention parameter. The following retention actions can be used:
-RetentionEnabled Boolean The RetentionEnabled parameter specifies that retention is enabled when it's set to $true.
-TriggerForRetention RetentionDateType The TriggerForRetention parameter specifies the date that's considered as the start date of the retention period. An item can reach its retention limit a specific number of days after the item was delivered or after...
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.