This week I release the new and Improved “Connect-ExchangeService” function with complete rework of the auto resolve functionality.
You can find the script in the TechNet gallery or under the script section of this site.
The full explanation of this function can be found on the release page here:
http://www.tech-savvy.nl/2017/01/26/ps-script-connect-to-one-or-multiple-exchange-server-powershell-sessions-from-any-computer/
Version Changes:
Date: (dd-MM-YYYY) | Version: | Changed By | Info: |
25-01-2017 | V1.0 | Martijn van Geffen | Released to TechNet |
01-12-2017 | V1.1 | Martijn van Geffen | Update code to retry any AD site when a specific version is used without AD site and client site does not contain a exchange server of that version. |
V1.2 | Martijn van Geffen | Redone the auto resolve logic Added support for searching adjacent AD sites if no server in own site Updated code to skip Edge servers Added some additional verbose code for trouble shooting Added some additional debug code for trouble shooting |
|
06-03-2018 | V1.3 | Martijn van Geffen | Changed behavior to always search adjacent sites if no servers found. |
What is fixed/enhanced is this new version:
I have completely reword the discovery and connection of exchange servers and extended the search to now do the following sequence:
Connect with version filter | Discover without version filter |
Discover:
Connect: Attempt 5 connections choosing a random server from the pool of returned servers from the discovery. If credentials are wrong stop after 2 attempts. |
Discover:
Connect: Attempt 5 connections choosing a random server from the pool of returned servers from the discovery. If credentials are wrong stop after 2 attempts. |
When multiple version have been found the highest version is still returned.
With this new logic using the auto discovering Exchange servers option should always find a server to connect to. Last week I released a update for the “get-ldapobject” function that is mandatory for this function. The updates in that function make multi / multiple domain forests connections now very reliable.
In the old version when a Exchange organization had deployed Exchange edge servers the script would detect the edge subscription objects and try to connect to these servers. This behavior is now changed by filtering edge servers from the discovery process. If you want to connect to edge servers use manual connection and authorization credentials.
Finally a lot of new code has been added to the verbose and debug streams to follow the discover and connection process.
Let me know what you think of the improvements or if you have any other comments.
have fun connecting.
Martijn van Geffen