Monday, January 24, 2011

Script to search for all domain controller in a domain

Simple powershell script to get all domain controller details in domain.


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

No comments: