Gets a list of all of the domain controllers for all the domains within a forest.



$allDCs = (Get-ADForest).Domains | %{ Get-ADDomainController -Filter * -Server $_ } | export-csv -path C:\Dclist.csv -NoTypeInformation


Comments

Popular posts from this blog

Copy file to multiple remote server using powershell