Avatar of Manish Kumar
Manish Kumar

asked on 

Script to add IP address in Recieve Connector on edge servers

Hello Everybody,

I need to add different IP addresses of any application server under Receive Connector->Networks tab by a script.
I have 6 edge servers and i want to add it by a script on all server at once.

I have also attached the screenshots for ref as well

I know how to add it by logging into one by one on all servers.
Please let me know the way to do it on all edge servers at once

Details
Exchange server 2010 sp3
MBX-server -8
CAS/HUB-4
Edge-server-6
ExchangeEmail Servers

Avatar of undefined
Last Comment
Stuart
Avatar of Stuart
Stuart
Flag of United Kingdom of Great Britain and Northern Ireland image

I use the following that references a text file with a list of internal IP addresses

$RecvConn = Get-ReceiveConnector "internal_relay"
Get-Content .\RemoteIP.txt | foreach {$RecvConn.RemoteIPRanges += "$_"}
Set-ReceiveConnector "internal_relay" -RemoteIPRanges $RecvConn.RemoteIPRanges

Presuming your connectors are named the same you could run this OR wild card the command where required
Avatar of Stuart
Stuart
Flag of United Kingdom of Great Britain and Northern Ireland image

Example to wildcard the command to suit your environment

$RecvConn = Get-ReceiveConnector "*int*"
Get-Content .\RemoteIP.txt | foreach {$RecvConn.RemoteIPRanges += "$_"}
Set-ReceiveConnector -RemoteIPRanges $RecvConn.RemoteIPRanges

Dont forget to have the remoteip.txt file int he directory that you run this in OR insert the full path
Avatar of Manish Kumar
Manish Kumar

ASKER

will this script add ip adress to all edge servers at once or I have to run ir on every server ony by one
Avatar of Gaurav Singh
Gaurav Singh
Flag of India image

you will need to run this script on all edge servers to add the IPs.
Avatar of Stuart
Stuart
Flag of United Kingdom of Great Britain and Northern Ireland image

Sorry I missed your comment Manish yes the above is correct you need to run this on each one
Avatar of Manish Kumar
Manish Kumar

ASKER

@Gaurav adn @Stuart
Thank you for confirmation. I need it a script which will run from one server.
I know edge servers are in DMZ but still with the help of IP of all edge servers can it be possible?
ASKER CERTIFIED SOLUTION
Avatar of Stuart
Stuart
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Exchange
Exchange

Exchange is the server side of a collaborative application product that is part of the Microsoft Server infrastructure. Exchange's major features include email, calendaring, contacts and tasks, support for mobile and web-based access to information, and support for data storage.

213K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo