Appending a value to a multivalued property is simple. It just takes a few extra steps. Again, assume that the BlockedRecipients property contains the values that are listed in the first section of this topic.
First, you have to retrieve the object that you want to modify and assign it to a variable. For example, use the following command to assign the RecipientFilterConfig object to the variable $Example.
$Example = Get-RecipientFilterConfig
If you run the command $Example | Format-List BlockedRecipients, the following is returned.
BlockedRecipients : {david@adatum.com, kim@northwindtraders.com, john@contoso.com}
Next, you have to add the value that you want to append to the BlockedRecipients property on the object that's stored in the variable $Example. Be aware that this step only adds the value to the object that's stored in the variable. To add chris@contoso.com to the BlockedRecipients property on the object that's stored in the variable $Example, run the following command.
$Example.BlockedRecipients += "chris@contoso.com"
If you run the command $Example | Format-List BlockedRecipients again, the following is returned.
BlockedRecipients : {david@adatum.com, kim@northwindtraders.com, john@contoso.com, chris@contoso.com}
As you can see, the SMTP address chris@contoso.com has been added to the list of values that are stored in the BlockedRecipients property.
Finally, you have to save the object that's stored in $Example by using the following command.
Set-RecipientFilterConfig -BlockedRecipients $Example.BlockedRecipients
Now, when you run the Get-RecipientFilterConfig | Format-List BlockedRecipients command, you will see that the SMTP address chris@contoso.com has been added to the server.

Appending Multiple Values to a Multivalued Property
If you want to append many values at the same time to a multivalued property, perform the same step as described earlier. When you specify the values that you want to append, separate the values by using commas as in the following example.
$Example.BlockedRecipients += "user1@contoso.com", "user2@contoso.com", "user3@contoso.com"
After you've specified the values that you want to add, use the Set-RecipientFilterConfig cmdlet to save the object.
Note: |
|---|
|
Some cmdlets don't let you append multiple values at the same time.
|