Jaime Umali
asked on
EXCHANGE HUB/CAS CONNECTORS
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
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
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.16 8.8.103 (like that for example) -PermissionGroups 'AnonymousUsers'
ASKER
@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?
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
run them one after the other
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).
ASKER
@Akhater - i have this error:
[PS] C:\Users\myName\Desktop>$r c = 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'
[PS] C:\Users\myName\Desktop>$r
Get-ReceiveConnector : A parameter cannot be found that matches parameter name 'Name'.
At line:1 char:33
+ $rc = get-ReceiveConnector -Name <<<< 'wintel'
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
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
ASKER
Yes i already have an existing with 50 IPs.
now i have this:
[PS] C:\Users\myName\Desktop>$r c = 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
now i have this:
[PS] C:\Users\myName\Desktop>$r
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
wait each command on its own like
ASKER
sorry didn't get you? you meant line by line?
$rc = get-ReceiveConnector 'Wintel' [enter]
$rc.RemoteIPRanges += '121.12.23.12' [enter]
set-ReceiveConnector -Name 'Wintel' -RemoteIPRanges $rc.RemoteIPRanges [enter]
$rc.RemoteIPRanges += '121.12.23.12' [enter]
set-ReceiveConnector -Name 'Wintel' -RemoteIPRanges $rc.RemoteIPRanges [enter]
ASKER
the second i have this
[PS] C:\Users\myName\Desktop>$r c.RemoteIP Ranges += '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'
[PS] C:\Users\myName\Desktop>$r
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'
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.16 8.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)
You can also use:
set-ReceiveConnector -Identity Wintel -Bindings 10.10.10.1:25 -RemoteIPRanges 192.168.8.1-192.168.8.100,
$rc.RemoteIPRanges
alone
alone
I just tried it here and it is working
ASKER
yeah sorry the first and 2nd works :)) the third line i have this:
[PS] C:\Users\myName\Desktop>se t-ReceiveC onnector -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 :}}
[PS] C:\Users\myName\Desktop>se
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 :}}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Genius!!!! The Guru The MAAAAN!!!
ASKER
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!!!!!
$rc = get-ReceiveConnector -Name 'Wintel'
$rc.RemoteIPRanges += '121.12.23.12'
set-ReceiveConnector -Name 'Wintel' -RemoteIPRanges $rc.RemoteIPRanges