July 2017
Intermediate to advanced
648 pages
31h 9m
English
To update multiple receive connectors, the code is almost identical. All we have to do is retrieve all the connectors we want to update, and then update them one by one. In the following example, we are updating the Relay receive connector across all servers in the environment:
Get-ReceiveConnector "*\Relay" | % {
$_.RemoteIPRanges += "10.0.0.99", "10.0.0.100", "10.0.0.101"
Set-ReceiveConnector $_ -RemoteIPRanges $_.RemoteIPRanges
}
If we have a long list of IP addresses to add, typing all of them can be out of the question. In this case, it is much easier to put them all in a text file, in this case named IPlist.txt, and use that file to update the receive connectors:
$recCon = Get-ReceiveConnector "EX1\Relay"
cat .\IPlist.txt ...Read now
Unlock full access