Getting all domain controllers in a forest 2


Using something like Get-ADDomainController -Forest would be something too easy for module designers at Microsoft. Or does Microsoft no longer have multi-domain forests in its internal IT?

Never mind, here is a nice snippet to retrieve that you may want to adapt to the fields you need to retrieve

 


Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 thoughts on “Getting all domain controllers in a forest

  • Irving

    Just what I was looking for to resolve an inquiry @job. Thank’s Dimitri and people like you that help making the command line journey one friendly and more understandable even for dummies like me.

    I hope one day I reach the level so I can do a contribution like this one myself.

    Cheers!!

  • Chris

    Great PowerShell script. You know what your doing, as i’m new to the PS game, much appreciated though. This was able to get me what I needed quickly instead of using ADUC and exporting.

    Thanks a bunch