Sample script that searches Active Directory for all the discoverable domain controllers in a domain.

PowerShell
Edit|Remove
$objDomain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() 
$objDomain.FindAllDiscoverableDomainControllers() | Select-Object Name