It’s been a few months since I’ve updated this tool, but feedback from two individuals led me to a couple of small updates:
- Updated the method by which domain controllers are selected for testing. Previously, I just used the $env:LOGONSERVER variable to find the authenticating DC and didn’t actually use any of the other DCs in site (any of which AAD Connect can bind to). I’ve updated it to use:
$CurrentSite = [System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetComputerSite().Name [array]$DCs = (Get-ADDomainController -Filter { Site -eq $CurrentSite }).HostName $DCs = $DCs.ToLower() | Sort -UniqueI retained the old method in the event that for some reason, the new methods fails (for example, inaccessibility of network ports)–that’s the story behind the Sort command at the end.
- There’s an updated PasswordReset endpoint for GCCH/DOD environments.
The new version, 4.4.2, is available from the PowerShell Gallery: https://www.powershellgallery.com/packages/AADConnect-CommunicationsTest. You can update using:
Update-Script AADConnect-CommunicationsTest
Cheers!

