Set-DataClassification

This cmdlet is functional only in on-premises Exchange.

In Exchange Online, this cmdlet has been replaced by the Set-DlpSensitiveInformationType cmdlet in Security & Compliance PowerShell.

Use the Set-DataClassification cmdlet to modify data classification rules that use document fingerprints.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Syntax

Set-DataClassification
   [-Identity] <DataClassificationIdParameter>
   [-Confirm]
   [-Description <String>]
   [-DomainController <Fqdn>]
   [-Fingerprints <MultiValuedProperty>]
   [-IsDefault]
   [-Locale <CultureInfo>]
   [-Name <String>]
   [-WhatIf]
   [<CommonParameters>]

Description

Classification rule packages are used by data loss prevention (DLP) to detect sensitive content in messages.

You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

Examples

Example 1

Set-DataClassification "Contoso Confidential" -Locale fr -Name "Contoso Confidentiel" -Description "Ce message contient des informations confidentielles." -IsDefault

This example adds a French translation to the existing data classification rule named "Contoso Confidential", and sets this French translation as the default.

Example 2

Set-DataClassification "Contoso Confidential" -Locale es -Name $null -Description $null

This example removes the existing Spanish translation from the data classification rule named "Contoso Confidential".

Example 3

$Benefits_Template = [System.IO.File]::ReadAllBytes('C:\My Documents\Contoso Benefits Template.docx')

$Benefits_Fingerprint = New-Fingerprint -FileData $Benefits_Template -Description "Contoso Benefits Template"

$Contoso_Confidential = Get-DataClassification "Contoso Confidential"

$Array = [System.Collections.ArrayList]($Contoso_Confidential.Fingerprints)

$Array.Add($Benefits_FingerPrint)

Set-DataClassification $Contoso_Confidential.Identity -FingerPrints $Array

This example modifies the existing data classification rule named "Contoso Confidential" by adding a new document fingerprint for the file C:\My Documents\Contoso Benefits Template.docx without affecting any existing document fingerprints that are already defined.

Example 4

$cc = Get-DataClassification "Contoso Confidential"

$a = [System.Collections.ArrayList]($cc.Fingerprints)

$a

$a.RemoveAt(0)

Set-DataClassification $cc.Identity -FingerPrints $a

This example modifies the data classification rule named "Contoso Confidential" by removing an existing document fingerprint without affecting other document fingerprints that are already defined.

The first three commands return the list of document fingerprints in the data classification. The first document fingerprint in the list has the index number 0, the second has the index number 1, and so on. You use the index number to specify the document fingerprint that you want to remove. The last two commands remove the first document fingerprint that's displayed in the list.

Parameters

-Confirm

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.
  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.
Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-Description

The Description parameter specifies a description for the data classification rule. You use the Description parameter with the Locale and Name parameters to specify descriptions for the data classification rule in different languages. The localized values of Description appear in the AllLocalizedDescriptions property of the data classification rule.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-DomainController

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 (FQDN). For example, dc01.contoso.com.

Type:Fqdn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019

-Fingerprints

The Fingerprints parameter specifies the byte-encoded document files that are used as fingerprints by the data classification rule. For instructions on how to import documents to use as templates for fingerprints, see New-Fingerprint or the Examples section. For instructions on how to add and remove document fingerprints from an existing data classification rule, see the Examples section.

Type:MultiValuedProperty
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-Identity

The Identity parameter specifies the data classification rule that you want to modify. You can use any value that uniquely identifies the data classification rule. For example:

  • Name
  • LocalizedName
  • Identity GUID value
Type:DataClassificationIdParameter
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-IsDefault

The IsDefault switch is used with the Locale parameter to specify the default language for the data classification rule. You don't need to specify a value with this switch.

The default Locale value is stored in the DefaultCulture property.

When you change the default Locale value, the Name value of the data classification rule changes to match the Name value that's associated with the new default locale. The original Name value when the rule was created is permanently stored the LocalizedName property.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-Locale

The Locale parameter adds or removes languages that are associated with the data classification rule.

Valid input for this parameter is a supported culture code value from the Microsoft .NET Framework CultureInfo class. For example, da-DK for Danish or ja-JP for Japanese. For more information, see CultureInfo Class.

Typically, you use the Locale parameter with the Name and Description parameters to add or remove translated names and descriptions for the data classification rule. You can also use the Locale parameter with the IsDefault switch to designate an existing translated name and description as the default. Before you can remove the default translation, you need to set another translation as the default.

Type:CultureInfo
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-Name

The Name parameter specifies a name for the data classification rule. The value must be less than 256 characters.

You use the Name parameter with the Locale and Description parameters to specify names for the data classification rule in different languages. The localized values of Name appear in the AllLocalizedNames property of the data classification rule.

The value of the Name parameter is used in the Policy Tip that's presented to users in Outlook on the web. When a translated value of the Name parameter matches the client's language, the Policy Tip is displayed in the client's language. If no translated values of the Name parameter match the client's language, the default translation that's specified by the IsDefault parameter is used for the Policy Tip.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-WhatIf

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

Inputs

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.

Outputs

Output 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.