Maybe you discovered it yourself, maybe not. When you want to add values to the bypassedsenderdomains parameter via the set-contentfilterconfig you will lose all previous settings.

After some searching on Google I found the solution:

$list = (Get-ContentFilterConfig).BypassedSenderDomains
  
$list.add('test100.com')
  
Set-ContentFilterConfig -BypassedSenderDomains:$list

With the first rule we will get the value of the BypassedSenderDomains and will save it as the variable $list.

Next we will add the domain test100.com to the variable. When you would execute the command_$list_ you would get a complete list of the BypassedSenderDomains.

When your happy with the list we can update the BypassedSenderDomains with the new values.

You may sometimes want to delete a value, this can be done with the following code:

$list = (Get-ContentFilterConfig).BypassedSenderDomains
  
$list.remove('test100.com')
  
Set-ContentFilterConfig -BypassedSenderDomains:$list

Comments


Johan Veldhuis