Adding O365 & EOP IPs to Exchange Receive Connector

By |2017-12-11T16:12:05+00:00March 30th, 2015|Azure, Office 365|0 Comments

As my colleague pointed out earlier there have been some new additions to the IP list for O365, if you are like us and keep a tight hold on the IPs allowed to speak to your Exchange receive connectors this can involve a lengthy process of adding these IPs individually. However there is a command you can run, although be aware this replaces everything in the current connector – it does not add.

To get the current IPs in the connector run:

Get-ReceiveConnector -Identity “SERVERNAMECONNECTORNAME” | select -ExpandProperty RemoteIpRanges | select expression | Out-File c:current.txt

This will give you a nice little text file list of all the IPs.

Alternatively you can grab the IPs from the O365 website (remember to get the EOP ones too if you use it):

Should you wish to just add these ones, heres the command to replace your current connectors IPs:

Set-ReceiveConnector -Identity “SERVERNAMECONNECTORNAME” –RemoteIPRanges,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Unfortunately to get the command into the post i had to add some new lines so just delete carriage returns in the above.

Alternatively grab the list from your text file and just add the new ones!

Hope it helps!

Leave A Comment

like what you see? 

Sign-up to our newsletter and never miss out on the latest blogs, events and tech news from the world of risual
Give it a try, you can unsubscribe anytime.