Get Domain Controllers in an AD Site

Get-ADComputer -SearchBase “ou=domain controllers,dc=freiburg,dc=home” -filter * | foreach { Get-ADDomainController -Identity $_.DNSHostname}

#  optionally pipe it to   where Site -eq ‘<sitename>

Leave a Reply

Your email address will not be published. Required fields are marked *