Set-Label

Use the Set-Label cmdlet to modify sensitivity labels in your organization.

Syntax

Set-Label
   [-Identity] <ComplianceRuleIdParameter>
   [-AdvancedSettings <PswsHashtable>]
   [-ApplyContentMarkingFooterAlignment <Microsoft.Office.CompliancePolicy.Tasks.FlattenLabelActionUtils+ContentAlignment>]
   [-ApplyContentMarkingFooterEnabled <Boolean>]
   [-ApplyContentMarkingFooterFontColor <String>]
   [-ApplyContentMarkingFooterFontName <String>]
   [-ApplyContentMarkingFooterFontSize <Int32>]
   [-ApplyContentMarkingFooterMargin <Int32>]
   [-ApplyContentMarkingFooterText <String>]
   [-ApplyContentMarkingHeaderAlignment <Microsoft.Office.CompliancePolicy.Tasks.FlattenLabelActionUtils+ContentAlignment>]
   [-ApplyContentMarkingHeaderEnabled <Boolean>]
   [-ApplyContentMarkingHeaderFontColor <String>]
   [-ApplyContentMarkingHeaderFontName <String>]
   [-ApplyContentMarkingHeaderFontSize <Int32>]
   [-ApplyContentMarkingHeaderMargin <Int32>]
   [-ApplyContentMarkingHeaderText <String>]
   [-ApplyWaterMarkingEnabled <Boolean>]
   [-ApplyWaterMarkingFontColor <String>]
   [-ApplyWaterMarkingFontName <String>]
   [-ApplyWaterMarkingFontSize <Int32>]
   [-ApplyWaterMarkingLayout <Microsoft.Office.CompliancePolicy.Tasks.FlattenLabelActionUtils+WaterMarkingLayout>]
   [-ApplyWaterMarkingText <String>]
   [-ColumnAssetCondition <String>]
   [-Comment <String>]
   [-Conditions <MultiValuedProperty>]
   [-Confirm]
   [-ContentType <MipLabelContentType>]
   [-DisplayName <String>]
   [-EncryptionContentExpiredOnDateInDaysOrNever <String>]
   [-EncryptionDoNotForward <Boolean>]
   [-EncryptionDoubleKeyEncryptionUrl <String>]
   [-EncryptionEnabled <Boolean>]
   [-EncryptionEncryptOnly <Boolean>]
   [-EncryptionOfflineAccessDays <Int32>]
   [-EncryptionPromptUser <Boolean>]
   [-EncryptionProtectionType <Microsoft.Office.CompliancePolicy.Tasks.FlattenLabelActionUtils+SupportedProtectionType>]
   [-EncryptionRightsDefinitions <String>]
   [-EncryptionRightsUrl <String>]
   [-LabelActions <MultiValuedProperty>]
   [-LocaleSettings <MultiValuedProperty>]
   [-MigrationId <String>]
   [-NextLabel <ComplianceRuleIdParameter>]
   [-ParentId <ComplianceRuleIdParameter>]
   [-PreviousLabel <ComplianceRuleIdParameter>]
   [-Priority <Int32>]
   [-SchematizedDataCondition <String>]
   [-Setting <PswsHashtable>]
   [-Settings <PswsHashtable>]
   [-SiteAndGroupProtectionAllowAccessToGuestUsers <System.Boolean>]
   [-SiteAndGroupProtectionAllowEmailFromGuestUsers <System.Boolean>]
   [-SiteAndGroupProtectionAllowFullAccess <System.Boolean>]
   [-SiteAndGroupProtectionAllowLimitedAccess <System.Boolean>]
   [-SiteAndGroupProtectionBlockAccess <System.Boolean>]
   [-SiteAndGroupProtectionEnabled <System.Boolean>]
   [-SiteAndGroupProtectionLevel <SiteAndGroupProtectionLevelParameter>]
   [-SiteAndGroupProtectionPrivacy <Microsoft.Office.CompliancePolicy.Tasks.FlattenLabelActionUtils+GroupProtectionPrivacy>]
   [-SiteExternalSharingControlType <Microsoft.Office.CompliancePolicy.Tasks.SiteExternalSharingControlType>]
   [-Tooltip <String>]
   [-WhatIf]
   [<CommonParameters>]

Description

To use this cmdlet in Security & Compliance PowerShell, you need to be assigned permissions. For more information, see Permissions in the Microsoft Purview compliance portal.

Examples

Example 1

Set-Label -Identity "Label1" -LocaleSettings '{"localeKey":"DisplayName","Settings":[{"Key":"en-us","Value":"English display name"},{"Key":"de-de","Value":"Deutscher Anzeigename"},{"Key":"es-es","Value":"Nombre para mostrar en Español"}]}','{"localeKey":"tooltip","Settings":[{"Key":"en-us","Value":"This is an example label"},{"Key":"de-de","Value":"Dies ist ein Beispieletikett"},{"Key":"es-es","Value":"Esta es una etiqueta de ejemplo"}]}'

This example sets the localized label name and label Tooltips for "Label1" in different languages (English, German, and Spanish).

Example 2

Set-Label -Identity "Label1" -LocaleSettings '{"localeKey":"DisplayName","Settings":[{"Key":"en-us","Value":""},{"Key":"de-de","Value":""},{"Key":"es-es","Value":""}]}','{"localeKey":"tooltip","Settings":[{"Key":"en-us","Value":""},{"Key":"de-de","Value":""},{"Key":"es-es","Value":""}]}'

This example removes the localized label name and label Tooltips for "Label1" in different languages (English, German, and Spanish).

Parameters

-AdvancedSettings

The AdvancedSettings parameter enables specific features and capabilities for a sensitivity label.

Specify this parameter with the identity (name or GUID) of the sensitivity label, with key/value pairs in a hash table. To remove an advanced setting, use the same AdvancedSettings parameter syntax, but specify a null string value.

Some 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 and services that support built-in labeling. For a list of these and instructions, see Custom configurations for the Azure Information Protection unified labeling client.

Supported settings for built-in labeling:

For more information to help you configure advanced settings for a label, see PowerShell tips for specifying the advanced settings.

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

-ApplyContentMarkingFooterAlignment

The ApplyContentMarkingFooterAlignment parameter specifies the footer alignment. Valid values are:

  • Left
  • Center
  • Right

This parameter is meaningful only when the ApplyContentMarkingFooterEnabled parameter value is either $true or $false.

Type:Microsoft.Office.CompliancePolicy.Tasks.FlattenLabelActionUtils+ContentAlignment
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyContentMarkingFooterEnabled

The ApplyContentMarkingFooterEnabled parameter enables or disables the Apply Content Marking Footer action for the label. Valid values are:

  • $true: The Apply Content Marking Footer action is enabled.
  • $false: The Apply Content Marking Footer action is disabled.
Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyContentMarkingFooterFontColor

The ApplyContentMarkingFooterFontColor parameter specifies the color of the footer text. This parameter accepts a hexadecimal color code value in the format #xxxxxx. The default value is #000000.

This parameter is meaningful only when the ApplyContentMarkingFooterEnabled parameter value is either $true or $false.

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

-ApplyContentMarkingFooterFontName

The ApplyContentMarkingFooterFontName parameter specifies the font of the footer text. If the value contains spaces, enclose the value in quotation marks ("). For example "Courier New".

This parameter is meaningful only when the ApplyContentMarkingFooterEnabled parameter value is either $true or $false.

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

-ApplyContentMarkingFooterFontSize

The ApplyContentMarkingFooterFontSize parameter specifies the font size (in points) of the footer text.

This parameter is meaningful only when the ApplyContentMarkingFooterEnabled parameter value is either $true or $false.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyContentMarkingFooterMargin

The ApplyContentMarkingFooterMargin parameter specifies the size (in points) of the footer margin.

This parameter is meaningful only when the ApplyContentMarkingFooterEnabled parameter value is either $true or $false.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyContentMarkingFooterText

The ApplyContentMarkingFooterText parameter specifies the footer text. If the value contains spaces, enclose the value in quotation marks (").

This parameter is meaningful only when the ApplyContentMarkingFooterEnabled parameter value is either $true or $false.

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

-ApplyContentMarkingHeaderAlignment

The ApplyContentMarkingHeaderAlignment parameter specifies the header alignment. Valid values are:

  • Left
  • Center
  • Right

This parameter is meaningful only when the ApplyContentMarkingHeaderEnabled parameter value is either $true or $false.

Type:Microsoft.Office.CompliancePolicy.Tasks.FlattenLabelActionUtils+ContentAlignment
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyContentMarkingHeaderEnabled

The ApplyContentMarkingHeaderEnabled parameter enables or disables the Apply Content Marking Header action for the label. Valid values are:

  • $true: The Apply Content Marking Header action is enabled.
  • $false: The Apply Content Marking Header action is disabled.
Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyContentMarkingHeaderFontColor

The ApplyContentMarkingHeaderFontColor parameter specifies the color of the header text. This parameter accepts a hexadecimal color code value in the format #xxxxxx. The default value is #000000.

This parameter is meaningful only when the ApplyContentMarkingHeaderEnabled parameter value is either $true or $false.

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

-ApplyContentMarkingHeaderFontName

The ApplyContentMarkingHeaderFontName parameter specifies the font of the header text. If the value contains spaces, enclose the value in quotation marks ("). For example "Courier New".

This parameter is meaningful only when the ApplyContentMarkingHeaderEnabled parameter value is either $true or $false.

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

-ApplyContentMarkingHeaderFontSize

The ApplyContentMarkingHeaderFontSize parameter specifies the font size (in points) of the header text.

This parameter is meaningful only when the ApplyContentMarkingHeaderEnabled parameter value is either $true or $false.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyContentMarkingHeaderMargin

The ApplyContentMarkingHeaderMargin parameter specifies the size (in points) of the header margin.

This parameter is meaningful only when the ApplyContentMarkingHeaderEnabled parameter value is either $true or $false.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyContentMarkingHeaderText

The ApplyContentMarkingHeaderText parameter specifies the header text. If the value contains spaces, enclose the value in quotation marks (").

This parameter is meaningful only when the ApplyContentMarkingHeaderEnabled parameter value is either $true or $false.

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

-ApplyWaterMarkingEnabled

The ApplyWaterMarkingEnabled parameter enables or disables the Apply Watermarking Header action for the label. Valid values are:

  • $true: The Apply Watermarking Header action is enabled.
  • $false: The Apply Watermarking Header action is disabled.
Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyWaterMarkingFontColor

The ApplyWaterMarkingFontColor parameter specifies the color of the watermark text. This parameter accepts a hexadecimal color code value in the format #xxxxxx. The default value is #000000.

This parameter is meaningful only when the ApplyWaterMarkingEnabled parameter value is either $true or $false.

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

-ApplyWaterMarkingFontName

The ApplyWaterMarkingFontName parameter specifies the font of the watermark text. If the value contains spaces, enclose the value in quotation marks ("). For example "Courier New".

This parameter is meaningful only when the ApplyWaterMarkingEnabled parameter value is either $true or $false.

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

-ApplyWaterMarkingFontSize

The ApplyWaterMarkingFontSize parameter specifies the font size (in points) of the watermark text.

This parameter is meaningful only when the ApplyWaterMarkingEnabled parameter value is either $true or $false.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyWaterMarkingLayout

The ApplyWaterMarkingAlignment parameter specifies the watermark alignment. Valid values are:

  • Horizontal
  • Diagonal

This parameter is meaningful only when the ApplyWaterMarkingEnabled parameter value is either $true or $false.

Type:Microsoft.Office.CompliancePolicy.Tasks.FlattenLabelActionUtils+WaterMarkingLayout
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ApplyWaterMarkingText

The ApplyWaterMarkingText parameter specifies the watermark text. If the value contains spaces, enclose the value in quotation marks (").

This parameter is meaningful only when the ApplyWaterMarkingEnabled parameter value is either $true or $false.

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

-ColumnAssetCondition

This parameter is reserved for internal Microsoft use.

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

-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

-Conditions

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

-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

-ContentType

The ContentType parameter specifies where the sensivity label can be applied. Valid values are:

  • File, Email
  • Site, UnifiedGroup
  • PurviewAssets

Values can be combined, for example: "File, Email, PurviewAssets". Splitting related content types like "File, Email" into just "File" or just "Email" is not supported.

Type:MipLabelContentType
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-DisplayName

The DisplayName parameter specifies the display name for the sensitivity label. The display name appears in any client that supports sensitivity labels. This includes Word, Excel, PowerPoint, Outlook, SharePoint, Teams, and Power BI.

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

-EncryptionContentExpiredOnDateInDaysOrNever

The EncryptionContentExpiredOnDateInDaysOrNever parameter specifies when the encrypted content expires. Valid values are:

  • An integer (number of days)
  • The value Never

This parameter is meaningful only when the EncryptionEnabled parameter value is either $true or $false.

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

-EncryptionDoNotForward

The EncryptionDoNotForward parameter specifies whether the Do Not Forward template is applied. Valid values are:

  • $true: The Do Not Forward template is applied.
  • $false: The Do Not Forward template is not applied.

This parameter is meaningful only when the EncryptionEnabled parameter value is either $true or $false.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-EncryptionDoubleKeyEncryptionUrl

This parameter is reserved for internal Microsoft use.

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

-EncryptionEnabled

The EncryptionEnabled parameter specifies whether encryption in enabled. Valid values are:

  • $true: Encryption is enabled.
  • $false: Encryption is disabled.
Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-EncryptionEncryptOnly

The EncryptionEncryptOnly parameter specifies whether the encrypt-only template is applied. Valid values are:

  • $true: The encrypt-only template is applied.
  • $false: The encrypt-only template is not applied.

This parameter is meaningful only when the EncryptionEnabled parameter value is either $true or $false.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-EncryptionOfflineAccessDays

The EncryptionOfflineAccessDays parameter specifies the number of days that offline access is allowed.

This parameter is meaningful only when the EncryptionEnabled parameter value is either $true or $false.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-EncryptionPromptUser

The EncryptionPromptUser parameter specifies whether to set the label with user defined permission in Word, Excel, and PowerPoint. Valid values are:

  • $true: The label is set with user defined permissions in Word, Excel and PowerPoint.
  • $false: The label is not set with user defined permissions in Word, Excel and PowerPoint.

This parameter is meaningful only when the EncryptionEnabled parameter value is either $true or $false, and when the EncryptionProtectionType parameter value is UserDefined.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-EncryptionProtectionType

The EncryptionProtectionType parameter specifies the protection type for encryption. Valid values are:

  • Template
  • RemoveProtection
  • UserDefined

This parameter is meaningful only when the EncryptionEnabled parameter value is either $true or $false.

Type:Microsoft.Office.CompliancePolicy.Tasks.FlattenLabelActionUtils+SupportedProtectionType
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-EncryptionRightsDefinitions

The EncryptionRightsDefinitions parameter specifies the rights users have when accessing protected. This parameter uses the syntax Identity1:Rights1,Rights2;Identity2:Rights3,Rights4. For example, john@contoso.com:VIEW,EDIT;microsoft.com:VIEW.

This parameter is meaningful only when the EncryptionEnabled parameter value is either $true or $false and the EncryptionProtectionType parameter value is Template.

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

-EncryptionRightsUrl

The EncryptionRightsUrl parameter specifies the URL for hold your own key (HYOK) protection.

This parameter is meaningful only when the EncryptionEnabled parameter value is either $true or $false.

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

-Identity

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

  • Name
  • Distinguished name (DN)
  • GUID
Type:ComplianceRuleIdParameter
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Security & Compliance

-LabelActions

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

-LocaleSettings

The LocaleSettings parameter specifies one or more localized label names and label Tooltips in different languages. Regions include all region codes supported in Office Client applications. Valid values use the following syntax (JSON):

  • Label display names: {"localeKey":"DisplayName","Settings":[{"Key":"en-us","Value":"English display name"},{"Key":"de-de","Value":"Deutscher Anzeigename"},{"Key":"es-es","Value":"Nombre para mostrar en Español"}]}
  • Label Tooltips: {"localeKey":"Tooltip","Settings":[{"Key":"en-us","Value":"English Tooltip"},{"Key":"de-de","Value":"Deutscher Tooltip"},{"Key":"es-es","Value":"Tooltip Español"}]}

To remove a language, you need to enter an empty value for that language.

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

-MigrationId

This parameter is reserved for internal Microsoft use.

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

-NextLabel

This parameter is reserved for internal Microsoft use.

Type:ComplianceRuleIdParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-ParentId

The ParentId parameter specifies the parent label that you want this label to be under (a sublabel). You can use any value that uniquely identifies the parent sensitivity label. For example:

  • Name
  • Distinguished name (DN)
  • GUID
Type:ComplianceRuleIdParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-PreviousLabel

This parameter is reserved for internal Microsoft use.

Type:ComplianceRuleIdParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-Priority

The Priority parameter specifies a priority value for the sensitivity label that determines the order of label processing. A higher integer value indicates a higher priority.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-SchematizedDataCondition

This parameter is reserved for internal Microsoft use.

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

-Setting

This parameter is reserved for internal Microsoft use.

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

-Settings

This parameter is reserved for internal Microsoft use.

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

-SiteAndGroupProtectionAllowAccessToGuestUsers

The SiteAndGroupProtectionAllowAccessToGuestUsers parameter enables or disables access to guest users. Valid values are:

  • $true: Guest access is enabled.
  • $false: Guest access is disabled.

This parameter is meaningful only when the SiteAndGroupProtectionEnabled parameter value is $true or $false.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-SiteAndGroupProtectionAllowEmailFromGuestUsers

The SiteAndGroupProtectionAllowEmailFromGuestUsers parameter enables or disables email from guest users. Valid values are:

  • $true: Email from guest users is enabled.
  • $false: Email from guest users is disabled.

This parameter is meaningful only when the SiteAndGroupProtectionEnabled parameter value is $true or $false.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-SiteAndGroupProtectionAllowFullAccess

The SiteAndGroupProtectionAllowFullAccess parameter enables or disables full access. Valid values are:

  • $true: Full access is enabled.
  • $false: Full access is disabled.

This parameter is meaningful only when the SiteAndGroupProtectionEnabled parameter value is $true or $false.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-SiteAndGroupProtectionAllowLimitedAccess

The SiteAndGroupProtectionAllowLimitedAccess parameter enables or disables limited access. Valid values are:

  • $true: Limited access is enabled.
  • $false: Limited access is disabled.

This parameter is meaningful only when the SiteAndGroupProtectionEnabled parameter value is $true or $false.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-SiteAndGroupProtectionBlockAccess

The SiteAndGroupProtectionBlockAccess parameter blocks access. Valid values are:

  • $true: Access is blocked.
  • $false: Access is allowed.

This parameter is meaningful only when the SiteAndGroupProtectionEnabled parameter value is $true or $false.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-SiteAndGroupProtectionEnabled

The SiteAndGroupProtectionEnabled parameter enables or disables the Site and Group Protection action for the label. Valid values are:

  • $true: The Site and Group Protection action is enabled.
  • $false: The Site and Group Protection action is disabled.
Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-SiteAndGroupProtectionLevel

This parameter is reserved for internal Microsoft use.

Type:SiteAndGroupProtectionLevelParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-SiteAndGroupProtectionPrivacy

The SiteAndGroupProtectionPrivacy parameter specifies the privacy level for the labe. Valid values are:

  • Public
  • Private

This parameter is meaningful only when the SiteAndGroupProtectionEnabled parameter value is $true or $false.

Type:Microsoft.Office.CompliancePolicy.PolicyConfiguration.AccessType
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-SiteExternalSharingControlType

The SiteExternalSharingControlType parameter specifies the external user sharing setting for the label. Valid values are:

  • ExternalUserAndGuestSharing
  • ExternalUserSharingOnly
  • ExistingExternalUserSharingOnly
  • Disabled

These correspond to the following settings through the admin center:

  • Anyone
  • New and Existing Guests
  • Existing Guests
  • Only people in your organization
Type:Microsoft.Office.CompliancePolicy.Tasks.SiteExternalSharingControlType
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Security & Compliance

-Tooltip

The ToolTip parameter specifies the default tooltip and sensitivity label description that's seen by users. It the value contains spaces, enclose the value in quotation marks (").

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

-WhatIf

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

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