IT Knowledge Base

Technical Repository

HowTo: Add multiple IP’s to Exchange Receive Connector CLI

Return the list of IP’s from the connector:

Get-ReceiveConnector "Relay Connector" | fl RemoteIPRanges

Add a single IP address to the Connector. We pull the list of existing IP’s and append the new IP and then add the entire list back.

$RecvConn = Get-ReceiveConnector "Relay Connector"
$RecvConn.RemoteIPRanges += "10.0.0.99"
Set-ReceiveConnector "Relay Connector" -RemoteIPRanges $RecvConn.RemoteIPRanges

Read a list of IP’s from a text file.

$RecvConn = Get-ReceiveConnector "Relay Connector"
Get-Content .\IPList.txt | foreach {$RecvConn.RemoteIPRanges += "$_"}
Set-ReceiveConnector "Relay Connector" -RemoteIPRanges $RecvConn.RemoteIPRanges

Return a list of IP’s configured on the connector. Expand the entire list.

Get-ReceiveConnector "Default SHRSRVEXCH01" | Select -ExpandProperty RemoteIPRanges

Thanks!



Leave a Reply