Querying Domain Controller objects using Powershell
- by Neobyte
Could someone explain to me why this does not work?
Import-Module ActiveDirectory
$dcs = Get-ADComputer -Filter {DistinguishedName -Like "*Domain Controllers*"}
I get no results for this query.
Alternatively, could someone suggest a way using the module above that I can generate a list of systems on my domain that are NOT Domain Controllers (which is what I'm eventually trying to achieve).
Cheers