Commands › Exchange Online

New-FeatureConfiguration

Exchange Online ExchangeOnlineManagement New-*

For more information, see Security & Compliance PowerShell. > [!NOTE] > This cmdlet is currently available in Public Preview, isn't available in all organizations, and is subject to change. Use the New-FeatureConfiguration cmdlet to create Microsoft Purview feature configurations within your organization, including: - Collection policies. - Advanced label based protection.

Quick start script

# New-FeatureConfiguration — 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-FeatureConfiguration
$before | Format-List

# 3. Make the change (dry run first)
New-FeatureConfiguration -Name <String> -FeatureScenario <PolicyScenario> -Mode <PolicyMode> -WhatIf
New-FeatureConfiguration -Name <String> -FeatureScenario <PolicyScenario> -Mode <PolicyMode>

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

Syntax

New-FeatureConfiguration [-Name] <String> -Mode <PolicyMode> -FeatureScenario <PolicyScenario> -ScenarioConfig <String>
 [-Comment <String>]
 [-Confirm]
 [-Locations <String>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (8)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies the unique name for the feature configuration. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
-FeatureScenario PolicyScenario yes The FeatureScenario parameter specifies the scenario for the feature configuration. Currently, the only valid values are: - `KnowYourData` for collection policies - `TrustContainer` for Endpoint DLP trust container
-Mode PolicyMode yes The Mode parameter specifies feature configuration mode. Valid values are:
-ScenarioConfig String yes The ScenarioConfig parameter specifies additional information about the feature configuration.
-Comment String The Comment parameter specifies an optional comment. If you specify a value that contains spaces, enclose the value in quotation marks ("), for example: "This is an admin note".
-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.
-Locations String The locations parameter specifies where the feature configuration applies.
-WhatIf SwitchParameter The WhatIf switch doesn't work in Security & Compliance PowerShell.

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