Set-TenantAllowBlockListSpoofItems

此指令程式只能在雲端式服務中使用。

使用 Set-TenantAllowBlockListSpoofItems Cmdlet 來修改租使用者允許/封鎖清單中的詐騙寄件者專案。

如需下方<語法>一節中參數集的詳細資訊,請參閱 Exchange Cmdlet 語法

Syntax

Set-TenantAllowBlockListSpoofItems
   [-Identity] <HostedConnectionFilterPolicyIdParameter>
   -Action <String>
   -Ids <String[]>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

此 Cmdlet 允許或封鎖詐騙配對, (「租使用者允許/封鎖清單」中的詐騙使用者和傳送基礎結構) 的組合。

您必須已獲指派權限,才能執行此指令程式。 雖然本主題已列出這個指令程式的所有參數,不過,如果某些參數並未包含在指派給您的權限中,您可能就無法存取這些參數。 若要尋找在組織中執行任何 Cmdlet 或參數所需的權限,請參閱 Find the permissions required to run any Exchange cmdlet

範例

範例 1

Get-TenantAllowBlockListSpoofItems | Format-Table SpoofedUser,SendingInfrastructure,SpoofType,Action,Identity

Set-TenantAllowBlockListSpoofItems -Identity Default -Action Block -Ids 375e76f1-eefb-1626-c8bc-5efefd057488,f8cb0908-8533-1156-ce7b-9aebd685b0eb

此範例會勾選指定的詐騙組。 您可以從 Identity 屬性) (Get-TenantAllowBlockListSpoofItems命令的輸出中取得 Ids 參數值。

範例 2

(Get-TenantAllowBlockListSpoofItems -SpoofType External | Select-Object -Property Identity).Identity | Remove-TenantAllowBlockListSpoofItems -Identity Default

此範例會從租使用者允許/封鎖清單中移除所有外部詐騙組。

參數

-Action

Action 參數會指定這個專案是允許或封鎖詐騙寄件者專案。 有效值為:

  • 允許
  • 封鎖
Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Security & Compliance, Exchange Online Protection

-Confirm

Confirm 參數會指定要顯示或隱藏確認提示。 這個參數對 Cmdlet 的影響取決於 Cmdlet 是否需要確認才能繼續作業。

  • 例如,具破壞性的 Cmdlet (例如 Remove-* Cmdlet) 內建暫停,可強制您在繼續之前確認命令。 對於這些 Cmdlet,您可以使用以下確切語法來略過確認提示:-Confirm:$false
  • 其他大部分的 Cmdlet (例如,New-* 和 Set-* Cmdlet) 沒有內建暫停。 在使用這些 Cmdlet 時,指定不含任何值的 Confirm 參數會引入強迫您認可命令後才繼續作業的暫停。
Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Online, Security & Compliance, Exchange Online Protection

-Identity

Identity 參數會使用 Default 值。

Type:HostedConnectionFilterPolicyIdParameter
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Online, Security & Compliance, Exchange Online Protection

-Ids

Ids 參數會指定您想要修改的詐騙配對。 有效的值是來自 Get-TenantAllowBlockListSpoofItems Cmdlet 輸出的 Identity 屬性值。 您可以指定多個以逗號分隔的值。

Type:String[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Online, Security & Compliance, Exchange Online Protection

-WhatIf

WhatIf 參數會模擬命令的動作。 使用此參數時,您不需要實際套用變更即可檢視可能會發生的變更。 您不需要使用此參數指定值。

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