Quick and dirty one here…
73# $dcObj = [adsi]"LDAP://OU=domain controllers,dc=domain,dc=local" 74# $dcs = $dcObj.PSBase.Children | % { $_.name } 75# $dcs ATLDOMSRVP05 ATLDOMSRVP06 ATLDOMSRVP07 ATLDOMSRVP08 BRUDOMSRVP02 KASDOMSRVP02 SOUDOMSRVP01 TOKDOMSRVP01
Of course now that you have a list like this, you can pipe it to another cmdlet to do useful things!
$dcs | % { Get-WmiObject win32_service -Filter "startmode = 'disabled'" -computer $_ }
And as some will know, “%” is shorthand for the “Foreach-Object” cmdlet.

…And tomorrow I will give you another assignment.
Thanks!
Here is different way
$context = new-object System.DirectoryServices.ActiveDirectory.DirectoryContext(“Domain”,”fully.qualified.domain.name”)
$dclist = [System.DirectoryServices.ActiveDirectory.DomainController]::findall($context)
$dclist | %{$_.name}
this will not only give you name, but all kinds of DC goodness
(note that “Domain” on line 1 is a literal string)