Sets the state of a spam filter for a customer's tenant.
The Set-CIPPSpamFilter function is used to edit the state of a spam filter for a customer's tenant. It takes the customer's tenant ID, a unique identifier (optional), the name of the spam filter, and the desired state (Enable or Disable) as parameters.
![]()
![]()
A unique identifier for the spam filter. This parameter is optional.
![]()
![]()
The desired state of the spam filter. Valid values are "Enable" or "Disable".
PS > Set-CIPPSpamFilter -CustomerTenantID "contoso.onmicrosoft.com" -Name "SpamFilter1" -State "Enable"
PS > Set-CIPPSpamFilter -CustomerTenantID "contoso.onmicrosoft.com" -Guid "abcdefg" -Name "SpamFilter2" -State "Disable"