I'm trying to import a CSV file with a list of domains to be added to the BypassedSenderDomains list, however I don't seem to be having much success. Here is the script I am using:
$domains = import-csv "e:\WhiteList.csv"
foreach($domain in $domains){
$list = (Get-ContentFilterConfig).BypassedSenderDomains
$list.add($domain.”dom”)
}
set-contentfilterconfig -BypassedSenderDomains:$list
Am i right, in that I'm just copying and pasting this into powershell?
After this is done, the powershell remains at the >> prompt, which I don't know how to get out of, aside from just closing it out, and reopening. Also when trying to see if the list populated by typing Get-ContentFilterConfig, nothing happens, but returns to a blank line with >>
My csv file is formatted with the dom as the column name, and the list of columns below it.
$list = (Get-ContentFilterConfig).
$list.add($domain.”dom”)
lines, use
set-contentfilterconfig -bypassedsenderdomains $list