To list all Receive Connectors use the following syntax:
Get-ReceiveConnector | fl
First we need to add all the bindings we want into a variable. And to do that we need to know how bindings work. Bindings are built up in the following way:
<IP address>:<port number>
In this example, I will add 0.0.0.0:26 and ::::26.
0.0.0.0:26 means that the server will listen on port 26 for all IPv4 addresses. If I want to add a specific address I will enter that address instead of just zeros. This can be useful if the server has multiple NICs but you only want it to accept connections on one of them. For example, if the IP-address is 192.168.5.10, the binding would have been 192.168.5.10:26.
The same goes for goes for IPv6, :::26 tells the server to listen on port 26 for all IPv6 addresses. You can of course specify a IPv6 address as well.
So, to add the bindings to a variable use the following syntax:
$bindings = ‘<IPv6 address>’, ‘<IPv4 address>’
Then we can move on and add it to a specific Receive Connector by using the following syntax:
Set-ReceiveConnector -identity "<receive connector identity>" -Bindings $bindings
Example of final syntax:
$bindings = ‘:::26′, ’0.0.0.0:26′
Set-ReceiveConnector -identity "EXLABB03\Default EXLABB03" -Bindings $bindings
This is easier since we don’t have to specify bindings. We can just add a port with the –port parameter.
To list all Send Connectors use the following syntax:
Get-SendConnector | fl
To change the port parameter for a specific Send Connector use this syntax:
Set-SendConnector -Identity "<send connector identity>" -port 26
Set-SendConnector -Identity "Default Send Connector" -Port 26
Hope this works well for you, if you have any questions don’t hesitate to drop a comment here or contact me.