Today I am sharing a TIP which I have used to connect Exchange Shell to different AD site Exchange server. (This can also be used to Connect Machine to different AD site domain Controller)
Issue is when We were launching exchange shell, it was trying to find exchange server in different sites & than connecting to the site that we don't want.
For resolving this we have added the below registry String Value
String Value SiteName (Type the Name of the site where exchange resides).
After updating the above parameter, Exchange shell will directly connect to right exchange server site without searching each site.
Remove the DynamicSiteName reg key from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Netlogon\Parameters & reboot.
When SiteName regkey is used , DynamicSIteName is not used.
For verifying the results:
You can use echo %logonserver% in cmd before & after the change (you can see different sites domain controllers used for logon)