There are some fun parameters with Get-ADDomainController too. If you're looking for the closest domain controller to the computer you're running the script from:
Get-ADDomainController -Discover -Domain yourdomain.com
There are some fun parameters with Get-ADDomainController too. If you're looking for the closest domain controller to the computer you're running the script from:
Get-ADDomainController -Discover -Domain yourdomain.com