Home > Exchange 2010, Powershell > Export List of IPs From Exchange 2010 Receive Connector

Export List of IPs From Exchange 2010 Receive Connector

If your Exchange environment is anything like the one where I am working today, then you will have an “SMTP Relay” connector configured. This is how you export the list of IP addresses in a “friendly” CSV format…

Get-ReceiveConnector “smtp relay”| select -ExpandProperty remoteipranges|export-csv c:\RelayIPs.csv

Just replace “smtp relay” with the name of your connector. I am exporting to a CSV called RelayIPs on the C drive.

“remoteipranges” is the attribute that gives us all the IP addresses, -ExpandProperty formats the text nicely so that you don’t get your results cut off with “…”

 

 

  1. Loon
    February 4, 2015 at 5:36 am

    Awesome, thank you !

  2. Ken Tookes
    March 7, 2016 at 11:44 pm

    Excellent!! Thanks for the Blog. Very helpful.

  3. rino
    June 28, 2016 at 4:28 pm

    the output is truncated somehow. not the same as the onscreen output. i replaced the csv output with txt instead.

  4. Agtila
    August 11, 2016 at 9:05 pm

    Perfect!
    I was searching such a command already years ago, without success… But now I have to thank you :)

  5. Nikhil K
    May 17, 2019 at 2:39 am

    Thank you!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: