- Active Directory Administration Cookbook
- Sander Berkouwer
- 126字
- 2021-06-24 14:42:17
Using the Active Directory module for Windows PowerShell to inventory domain controllers
Using the Active Directory Module for Windows PowerShell to inventory domain controllers is even easier.
Simply use the following PowerShell script:
Import-Module ActiveDirectory
Get-ADDomainController | Select 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 statement. 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 you can paste it in a report or anywhere else, append | clip.