$dcObj = [adsi]"LDAP://OU=domain controllers,dc=ar,dc=lugsaju,dc=com"
$dcs = $dcObj.PSBase.Children | % { $_.name }
$cantDCs = $dcs.count
$contDC = 0
foreach ($dc in $dcs){
$a = ping -n 1 $dc
$a = $(($a[2]).split("[")[1]).split("]")[0]
write-output "$dc`t$a"
}
con la ip de bonus track
No hay comentarios.:
Publicar un comentario