New-QuarantinePermissions

This cmdlet is available only in the cloud-based service.

Use the New-QuarantinePermissions cmdlet to create quarantine permissions objects to use with the New-QuarantineTag cmdlet.

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

Syntax

New-QuarantinePermissions
   [[-PermissionToAllowSender] <Boolean>]
   [[-PermissionToBlockSender] <Boolean>]
   [[-PermissionToDelete] <Boolean>]
   [[-PermissionToDownload] <Boolean>]
   [[-PermissionToPreview] <Boolean>]
   [[-PermissionToRelease] <Boolean>]
   [[-PermissionToRequestRelease] <Boolean>]
   [[-PermissionToViewHeader] <Boolean>]
   [<CommonParameters>]

Description

The default value for any parameters that you don't use is $false, so you only need to use parameters (permissions) that you want to set to $true.

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

$NoAccess = New-QuarantinePermissions

This example creates the same permissions that are used by the No access permissions group in quarantine tags in the Security & Compliance. The permissions object is stored in the variable named $NoAccess.

In the same Windows PowerShell session, you can use $NoAccess for the EndUserQuarantinePermissions parameter value in a New-QuarantineTag or Set-QuarantineTag command.

Example 2

$LimitedAccess = New-QuarantinePermissions -PermissionToBlockSender $true -PermissionToDelete $true -PermissionToPreview $true -PermissionToRequestRelease $true

This example creates the same permissions that are used by the Limited access permissions group in quarantine tags in the Security & Compliance. The permissions object is stored in the variable named $LimitedAccess.

In the same Windows PowerShell session, you can use $LimitedAccess for the EndUserQuarantinePermissions parameter value in a New-QuarantineTag or Set-QuarantineTag command.

Example 3

$FullAccess = New-QuarantinePermissions -PermissionToBlockSender $true -PermissionToDelete $true -PermissionToPreview $true -PermissionToRelease $true

This example creates the same permissions that are used by the Full access permissions group in quarantine tags in the Security & Compliance. The permissions object is stored in the variable named $FullAccess.

In the same Windows PowerShell session, you can use $FullAccess for the EndUserQuarantinePermissions parameter value in a New-QuarantineTag or Set-QuarantineTag command.

Parameters

-PermissionToAllowSender

{{ Fill PermissionToAllowSender Description }}

Type:Boolean
Position:1
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection

-PermissionToBlockSender

The PermissionToBlockSender parameter specifies whether users are allowed to add the quarantined message sender to their Blocked Senders list. Valid values are:

  • $true: The Block sender button is included in end-user quarantine notifications.
  • $false: The Block sender button is not included in end-user quarantine notifications. This is the default value.
Type:Boolean
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection

-PermissionToDelete

The PermissionToDelete parameter specifies whether users are allowed to delete messages from quarantine. Valid values are:

  • $true: The Remove from quarantine button is included in the quarantined message details.
  • $false: The Remove from quarantine button is not included in the quarantined message details. This is the default value.
Type:Boolean
Position:3
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection

-PermissionToDownload

The PermissionToDownload parameter specifies whether users are allowed to download messages from quarantine. Valid values are:

  • $true: The permission is enabled.
  • $false: The permission is disabled. This is the default value.

Currently, this value has no effect on the buttons that are included in end-user spam notifications or in quarantined message details.

Type:Boolean
Position:4
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection

-PermissionToPreview

The PermissionToPreview parameter specifies whether users are allowed to preview quarantined messages. Valid values are:

  • $true: The Preview message button is included in the quarantined message details.
  • $false: The Preview message button is not included in the quarantined message details. This is the default value.
Type:Boolean
Position:5
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection

-PermissionToRelease

The PermissionToRelease parameter specifies whether users are allowed to directly release messages from quarantine. Valid values are:

  • $true: The Release button is included in end-user spam notifications, and the Release message button is included in the quarantined message details.
  • $false: The Release button is not included in end-user spam notifications, and the Release message button is not included in the quarantined message details. This is the default value.

Don't set this parameter and the PermissionToRequestRelease parameter to $true. Set one parameter to $true and the other to $false, or set both parameters to $false.

Type:Boolean
Position:6
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection

-PermissionToRequestRelease

The PermissionToRequestRelease parameter specifies whether users are allowed to request messages to be released from quarantine. The request must be approved by an admin. Valid values are:

  • $true: The Release button is included in end-user spam notifications, and the Release message button is included in the quarantined message details.
  • $false: The Release button is not included in end-user spam notifications, and the Release message button is not included in the quarantined message details. This is the default value.

Don't set this parameter and the PermissionRelease parameter to $true. Set one parameter to $true and the other to $false, or set both parameters to $false.

Type:Boolean
Position:7
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection

-PermissionToViewHeader

The PermissionToViewHeader parameter specifies whether users are allowed to view the message headers of quarantined messages. Valid values are:

  • $true: The permission is enabled.
  • $false: The permission is disabled. This is the default value.

Currently, this value has no effect on the buttons that are included in end-user spam notifications or in quarantined message details. The View message header button is always available in the quarantined message details.

Type:Boolean
Position:8
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Exchange Online Protection