The Multifunctioning DBA

Jul 22 2009   9:59PM GMT

Get List of all DC’s in your Domain

Colin Smith Colin Smith Profile: Colin Smith

I am working on converting a vbscript that I wrote a couple of years ago into a powershell script. This script requires that I query all of the Domain Controllers in my domain to get the most up to date data that is possible. I used the Quest AD Commanlets and they made it easy. I have discussed these in the past and if you have not gotten them yet then go get them. They are at the following link:

to get a listing of your DC’s just do the following.

$dcs = Get-QADComputer -ComputerRole DomainController

now you have a listing of them in the $dcs variable and you can scan them all.

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: