For environments with load balancers or firewalls between the Exchange servers, it makes sense to configure static ports for the distribution of the address book and RPC. By default, Exchange uses dynamic ports for these two services, which makes the configuration of firewalls and load balancers more difficult.
To configure a static port for RPC, a new key with the name "ParametersSystem" must first be created in the registry under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeRpc\":
A DWORD value (32-bit) with the name "TCP/IP Port" is then created in the new key and the static port is entered. It is recommended to select a port between 1024 and 65535 that is not used by any other service. In this example, this is 50001.
After the port has been entered, the "Microsoft Exchange RPC Client Access Service" service must be restarted to apply the changes. The netstat command can be used to check whether the change is effective:
If the output of "Netstat -an | findstr 50001" looks something like the picture above, it has worked, if nothing is displayed, the spelling of the keys and values should be checked again (spaces at the end of the name, transposed numbers, etc.).
Proceed in the same way for the address book service. Create a new key "Parameters" (yes, Parameters not ParametersSystem as above) under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MSExchangeAB\". Create a new string with the name "RpcTcpPort" and enter 50002 as the value (or something between 1024 and 65535 again)
The "Microsoft Exchange address book" service must then be restarted for the changes to take effect. This can be checked again with "netstat -an | findstr 50002"