Add remote IP address ranges to an Exchange Server 2013 receive connctor.
Create a new text file containing the new remote IP address ranges
The script creates a new sub folder named ReceiveConnectorIpAddresses and saves the currently configured remote IP address ranges first.
While adding the new remote IP address ranges, the script checks, if the new ranges already exist.
# Add IP addresses from ip.txt to MYCONNECTOR
.\Add-ReceiveConnectorIpAddress.ps1 -ConnectorName MYCONNECTOR -FileName D:\Scripts\ip.txt
.\Add-ReceiveConnectorIpAddress.ps1 -ConnectorName REMOTECONNECTOR -FileName .\ip-new.txt -ViewEntireForest $true