Find a working domain controller from any domain even on non domain joined PC`s

This function can be used to find a domain controller in any domain and return a random responsive domain controller, even from a non domain joined computer.The function can be used in a PowerShell workflow without using any additional modules due to the use of the .NET framework

5 Star
471 times
Add to favorites
Active Directory
E-mail Twitter Digg Facebook
  • Search in multiple ADsites
    2 Posts | Last post March 15, 2018
    • Hi Martijn,
      Thanks for the additions!
      Is it possible to add the possibility to search in multiple sites? If I want to search for the fastest DC in two datacenters I need to search in two sites most of the time.
      Kind regards,
    • Hi Johan, 
      That is a nice feature request. 
      I will see what I can do with this one.
  • Check for ADWS
    3 Posts | Last post October 19, 2017
    • Hi Martijn,
      It would be nice if you could also choose to return domain controllers that have ADWS enabled.
      Kind regards,
    • Hi Johan. 
      Let me investigate on that possibility, in the mean while I have added support for discovering a GC that is up and running and will release that in the next version.
      I will try to add your request in the next release to  
    • Hi Johan,
      I have updated the script its is now available with support for ADWS and more. 
      See the version notes for all improvements / new features