Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Use Get-ADDomainController in Windows PowerShell

The Get-ADDomainController cmdlet is a powerful tool in Windows PowerShell that allows administrators to retrieve information about domain controllers in Active Directory. This cmdlet is essential for managing and maintaining the health of an Active Directory environment. It can provide details such as the domain controller's name, site, IP address, and operational status. Understanding how to use this cmdlet can help administrators quickly gather necessary information for troubleshooting and ensuring the smooth operation of their network.

Examples:

  1. Basic Usage: To retrieve information about all domain controllers in the current domain, you can use the following command:

    Get-ADDomainController -Filter *
  2. Retrieve Specific Domain Controller: To get information about a specific domain controller by its name, you can use:

    Get-ADDomainController -Identity "DC1"
  3. Filter by Site: If you want to find domain controllers in a specific site, you can filter by the site name:

    Get-ADDomainController -Filter {Site -eq "Default-First-Site-Name"}
  4. Check Operational Status: To check if a domain controller is operational, you can use:

    Get-ADDomainController -Filter * | Select-Object Name, IsGlobalCatalog, IsReadOnly, IsCriticalSystemObject
  5. Retrieve Domain Controller by IP Address: To find a domain controller by its IP address, you can use:

    Get-ADDomainController -Discover -Service "LDAP" -Site "Default-First-Site-Name"
  6. Exporting Results: You can export the results to a CSV file for further analysis:

    Get-ADDomainController -Filter * | Select-Object Name, Site, IPv4Address | Export-Csv -Path "C:\DCList.csv" -NoTypeInformation

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.