Solved

EXCHANGE HUB/CAS CONNECTORS

Posted on 2010-11-26
19
818 Views
Last Modified: 2012-05-10
Hi,

In my HUB/CAS server, I already have IP Adresses 50 entries, I wanted to add another 30 IP Addresses, but when I run this PS cmdlet it overwrites exisiting IPs. I need to have a PS cmdlet to "AMMEND" not "Overwrite"
here is my cmdlet:
New-ReceiveConnector -Name 'Wintel' -Server 'hubcas.contoso.com' -Usage 'Custom' -Bindings '0.0.0.0:25' -RemoteIPRanges '121.12.23.12' -PermissionGroups 'AnonymousUsers'

Thank you
0
Comment
Question by:Jaime Umali
  • 8
  • 8
  • 2
  • +1
19 Comments
 
LVL 49

Expert Comment

by:Akhater
ID: 34216838
try

$rc = get-ReceiveConnector -Name 'Wintel'
$rc.RemoteIPRanges += '121.12.23.12'
set-ReceiveConnector -Name 'Wintel' -RemoteIPRanges $rc.RemoteIPRanges
0
 
LVL 11

Expert Comment

by:JuusoConnecta
ID: 34216880
New-ReceiveConnector -Name Wintel -Usage Custom -Bindings '0.0.0.0:25' -RemoteIPRanges 192.168.8.1-192.168.8.100,192.168.8.101-192.168.8.103 (like that for example) -PermissionGroups 'AnonymousUsers'
0
 
LVL 2

Author Comment

by:Jaime Umali
ID: 34216921
@Akhater, sorry for my ignorance but how do you use the cmd? do you have to save it as pl file? or is it a vb?
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 49

Expert Comment

by:Akhater
ID: 34216928
no just the same way you ran the New-ReceiveConnector -Name 'Wintel' -Server 'hubcas.contoso.com' -Usage 'Custom' -Bindings '0.0.0.0:25' -RemoteIPRanges '121.12.23.12' -PermissionGroups 'AnonymousUsers'

run them one after the other
0
 
LVL 25

Expert Comment

by:Tony Johncock
ID: 34216934
Exchange Management Shell - they're basically PowerShell commands but with the Exchange commands wrapped up (be aware that just running PowerShell won't be enough - has to be the EMS, hence why I mentioned it).
0
 
LVL 2

Author Comment

by:Jaime Umali
ID: 34216978
@Akhater - i have this error:
[PS] C:\Users\myName\Desktop>$rc = get-ReceiveConnector -Name 'wintel
Get-ReceiveConnector : A parameter cannot be found that matches parameter name 'Name'.
At line:1 char:33
+ $rc = get-ReceiveConnector -Name  <<<< 'wintel'
0
 
LVL 49

Expert Comment

by:Akhater
ID: 34216981
remove -name
 i

ii am assuming you already have a receive connector called wintel right ?

$rc = get-ReceiveConnector 'Wintel'
$rc.RemoteIPRanges += '121.12.23.12'
set-ReceiveConnector -Name 'Wintel' -RemoteIPRanges $rc.RemoteIPRanges
0
 
LVL 2

Author Comment

by:Jaime Umali
ID: 34217013
Yes i already have an existing with 50 IPs.
now i have this:

[PS] C:\Users\myName\Desktop>$rc = get-ReceiveConnector 'wintel' $rc.RemoteIPRanges += '121.12.23.12' set-ReceiveConnector -Name 'wintel' -RemoteIPRanges $rc.RemoteIPRanges
Get-ReceiveConnector : A parameter cannot be found that matches argument '$null'.
At line:1 char:27
+ $rc = get-ReceiveConnector  <<<< 'wintel' $rc.RemoteIPRanges += '121.12.23.12' set-ReceiveConnector -Name 'wintel' -RemoteIPRanges $r
c.RemoteIPRanges
0
 
LVL 49

Expert Comment

by:Akhater
ID: 34217017
wait each command on its own like
0
 
LVL 2

Author Comment

by:Jaime Umali
ID: 34217026
sorry didn't get you? you meant line by line?
0
 
LVL 49

Expert Comment

by:Akhater
ID: 34217031
$rc = get-ReceiveConnector 'Wintel' [enter]

$rc.RemoteIPRanges += '121.12.23.12' [enter]

set-ReceiveConnector -Name 'Wintel' -RemoteIPRanges $rc.RemoteIPRanges [enter]
0
 
LVL 2

Author Comment

by:Jaime Umali
ID: 34217047
the second i have this
[PS] C:\Users\myName\Desktop>$rc.RemoteIPRanges += '121.12.23.12'
Property 'RemoteIPRanges' cannot be found on this object; make sure it exists and is settable.
At line:1 char:5
+ $rc.R <<<< emoteIPRanges += '121.12.23.12'
0
 
LVL 11

Expert Comment

by:JuusoConnecta
ID: 34217063
Although Akhater's method is fully functionel =]

You can also use:
set-ReceiveConnector -Identity Wintel -Bindings 10.10.10.1:25 -RemoteIPRanges 192.168.8.1-192.168.8.100,192.168.8.101-192.168.8.102 (just by including the current ip range and add a comma and type in the second ip ranges that you want to add to the connector)
0
 
LVL 49

Expert Comment

by:Akhater
ID: 34217065
$rc.RemoteIPRanges

alone
0
 
LVL 49

Expert Comment

by:Akhater
ID: 34217082
I just tried it here and it is working
0
 
LVL 2

Author Comment

by:Jaime Umali
ID: 34217104
yeah sorry the first and 2nd works :)) the third line i have this:

[PS] C:\Users\myName\Desktop>set-ReceiveConnector -Name 'wintel' -RemoteIPRanges $rc.RemoteIPRanges

cmdlet set-ReceiveConnector at command pipeline position 1
Supply values for the following parameters:
Identity:

after "Identity:" i have the cursor blinking like its waiting for me to put something. thanks for your patience on me Akhater :}}
0
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
ID: 34217110
set-ReceiveConnector 'wintel' -RemoteIPRanges $rc.RemoteIPRanges
0
 
LVL 2

Author Closing Comment

by:Jaime Umali
ID: 34217127
Genius!!!! The Guru The MAAAAN!!!
0
 
LVL 2

Author Comment

by:Jaime Umali
ID: 34217572
Akhater :) sorry to disturb again. do you know if possible to add "-Server" on that script? just to avoid loging in to every server? so i can do it on 1 HUB and just change the "-Server" entry?  if you have time :)  --  your script work well... it saved me a lot of time!!!!!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question