Querying Domain Controller objects using Powershell
Posted
by Neobyte
on Server Fault
See other posts from Server Fault
or by Neobyte
Published on 2010-03-24T06:35:26Z
Indexed on
2010/03/24
6:43 UTC
Read the original article
Hit count: 396
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
© Server Fault or respective owner