
Active Directory Administration Cookbook, Second Edition
By :

It's a good thing to know all the domain controllers throughout an Active Directory domain. This activity doesn't just show the management burden for Active Directory administrators; it also allows them to make smart choices, especially when the environment is breached.
Although it's not recommended practice, administrators may place domain controllers outside the Domain Controllers Organizational Unit (OU). In that case, simply checking the computer accounts in that OU will not provide a 100% view of the domain controllers in use.
This recipe shows two ways to get a good overview of the domain controllers in an Active Directory domain:
Active Directory Users and Computers allows for querying the entire Active Directory domain for either writable domain controllers or read-only domain controllers in the following way:
dsa.msc
. The Active Directory Users and Computers window appears.The list of domain controllers for the domain is now shown in the search results pane.
Using the Active Directory module for Windows PowerShell to inventory domain controllers is even easier.
Simply use the following line of Windows PowerShell:
Get-ADDomainController | Select-Object Name
If you want more information on the domain controllers within the current domain, simply add the characteristics you would like to see after the Select-Object
cmdlet. For instance, you can add IPv4Address
, IsGlobalCatalog
, isReadOnly
, OperatingSystem
, and Site
for good measure. If you're looking for a smart layout, simply append | Format-Table
. If you want to get the information straight to your clipboard so that you can paste it into a report or anywhere else, append | clip
.