This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
microsoft:excange_2013_whitelist [2017/11/24 15:12] admin |
microsoft:excange_2013_whitelist [2017/11/24 15:14] (current) admin |
||
|---|---|---|---|
| Line 37: | Line 37: | ||
| </code> | </code> | ||
| + | The main problem of using Set-ContentFilterConfig cmdlet is that each time it is run, it completely rewrites (clears) the current white list of the safe senders. To avoid it, each time you have to add a new address/domain to this list, get the current white list of addresses, add a new one to it and upload it back to Exchange. | ||
| + | To add several domains to the Exchange white list (without clearing current list entries), you can use the following script: | ||
| + | |||
| + | <code bash> | ||
| + | $list = (Get-ContentFilterConfig).BypassedSenderDomains | ||
| + | |||
| + | $list.add("domain1.com") | ||
| + | |||
| + | $list.add("domain2.com") | ||
| + | |||
| + | $list.add("domain3.com") | ||
| + | |||
| + | Set-ContentFilterConfig -BypassedSenderDomains $list | ||
| + | </code> | ||
| + | |||
| + | If you are adding individual addresses: | ||
| + | |||
| + | |||
| + | <code bash> | ||
| + | $list = (Get-ContentFilterConfig).BypassedSenders | ||
| + | |||
| + | $list.add("bob@gmail.com") | ||
| + | |||
| + | $list.add("jeorge@gmail.com") | ||
| + | |||
| + | Set-ContentFilterConfig -BypassedSenders $list | ||
| + | </code> | ||
| + | |||
| + | To delete one entry from the white list of senders, run this command: | ||
| + | |||
| + | <code bash> | ||
| + | Set-ContentFilterConfig -BypassedSenderDomains @{Remove="gmail.com"} | ||
| + | </code> | ||
| + | |||
| + | Or: | ||
| + | |||
| + | <code bash> | ||
| + | Set-ContentFilterConfig -BypassedSenders @{Remove="bob@gmail.com"} | ||
| + | </code> | ||