New-LabelPolicy

This cmdlet is available only in Security & Compliance Center PowerShell. For more information, see Security & Compliance Center PowerShell.

Use the New-LabelPolicy cmdlet to create sensitivity label policies in your organization.

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

Syntax

New-LabelPolicy
   -Name <String>
   -Labels <MultiValuedProperty>
   [-AdvancedSettings <PswsHashtable>]
   [-Comment <String>]
   [-Confirm]
   [-ExchangeLocation <MultiValuedProperty>]
   [-ExchangeLocationException <MultiValuedProperty>]
   [-Force]
   [-MigrationId <String>]
   [-ModernGroupLocation <MultiValuedProperty>]
   [-ModernGroupLocationException <MultiValuedProperty>]
   [-OneDriveLocation <MultiValuedProperty>]
   [-OneDriveLocationException <MultiValuedProperty>]
   [-PublicFolderLocation <MultiValuedProperty>]
   [-Setting <PswsHashtable>]
   [-Settings <PswsHashtable>]
   [-SharePointLocation <MultiValuedProperty>]
   [-SharePointLocationException <MultiValuedProperty>]
   [-SkypeLocation <MultiValuedProperty>]
   [-SkypeLocationException <MultiValuedProperty>]
   [-WhatIf]
   [<CommonParameters>]

Description

You need to be assigned permissions in the Security & Compliance Center before you can use this cmdlet. For more information, see Permissions in the Security & Compliance Center.

Examples

Example 1

New-LabelPolicy -Name "Research and Development" -Labels "R and D","R and D Management"

This example creates the sensitivity label policy named Research and Development that contains sensitivity labels named R and D and R and D Management.

Parameters

-AdvancedSettings

The AdvancedSettings parameter enables client-specific features and capabilities for the sensitivity label policy.

Most of the settings that you configure with this parameter are supported only by the Azure Information Protection unified labeling client and not by Office apps that support built-in labeling. For instructions, see Custom configurations for the Azure Information Protection unified labeling client.

Only the advanced settings of OutlookDefaultLabel and DisableMandatoryInOutlook are supported by Office apps that support built-in labeling. These two settings let you have a default label and mandatory labeling configurations that are specific to Outlook email messages, so you can have different configurations for Word, Excel, and PowerPoint documents. For more information, see Outlook-specific options for default label and mandatory labeling.

Type:PswsHashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-Comment

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

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-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
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-ExchangeLocation

The ExchangeLocation parameter specifies the mailboxes to include in the policy. A valid value is a mailbox.

To specify the mailbox, you can use any value that uniquely identifies it. For example:

  • Name
  • Distinguished name (DN)
  • Email address
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-ExchangeLocationException

The ExchangeLocationException parameter specifies the mailboxes to exclude when you use the value All for the ExchangeLocation parameter. A valid value is a mailbox.

To specify the mailbox, you can use any value that uniquely identifies it. For example:

  • Name
  • Distinguished name (DN)
  • Email address
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-Force

{{ Fill Force Description }}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-Labels

The Labels parameter specifies the sensitivity labels that are associated with the policy. You can use any value that uniquely identifies the label. For example:

  • Name
  • Distinguished name (DN)
  • GUID

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-MigrationId

{{ Fill MigrationId Description }}

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-ModernGroupLocation

The ModernGroupLocation parameter specifies the Microsoft 365 Groups to include in the policy. To identify the Microsoft 365 Group, you must use the primary SMTP address.

You can enter multiple values separated by commas. If the values contain spaces or otherwise require quotation marks, use the following syntax: "Value1","Value2",..."ValueN".

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-ModernGroupLocationException

This parameter is reserved for internal Microsoft use.

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-Name

The Name parameter specifies the unique name for the policy. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-OneDriveLocation

PARAMVALUE: MultiValuedProperty

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-OneDriveLocationException

PARAMVALUE: MultiValuedProperty

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-PublicFolderLocation

PARAMVALUE: MultiValuedProperty

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-Setting

PARAMVALUE: PswsHashtable

Type:PswsHashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-Settings

PARAMVALUE: PswsHashtable

Type:PswsHashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-SharePointLocation

PARAMVALUE: MultiValuedProperty

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-SharePointLocationException

PARAMVALUE: MultiValuedProperty

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-SkypeLocation

PARAMVALUE: MultiValuedProperty

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-SkypeLocationException

PARAMVALUE: MultiValuedProperty

Type:MultiValuedProperty
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center
-WhatIf

The WhatIf switch doesn't work in Security & Compliance Center PowerShell.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance Center

Inputs

Outputs