The following code examples shows two Set-RecipientFilterConfig commands.
The first code example shows how to modify the recipient filter configuration so that recipient validation is enabled.
The second code example shows how to enable the IP Block list and how to add recipients to the blocked recipient list.
The BlockedRecipients parameter takes multiple values. When you pass a value to the BlockedRecipients parameter, the existing value is replaced with the new value. For more information about how to add or remove values from multivalued properties, see Modifying Multivalued Properties.
Set-RecipientFilterConfig -RecipientValidationEnabled:$true
Set-RecipientFilterConfig -BlockListEnabled:$true -BlockedRecipients user1@contoso.com,user2@contoso.com