Lofty Worm
asked on
DC's in daom by IP and Name
Easy one, I know there must be a fast way to pull all the DC's in my domain (children also pls) and their IP's. It must be in DNS, and an adsi command or something.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
very VERY nice :)
Saved me BUNCHS of work :)
Thank you both so much, wish I could give out more then 500 points!
Saved me BUNCHS of work :)
Thank you both so much, wish I could give out more then 500 points!
ASKER
Very nice, :)
ASKER
ok, this is awesome, but one last question.
On my 2008 DC's in my other domain's, the resolve-dns command is not present. So
How do I add it?
or
How do I change the domain request from the DC that I have that works?
On my 2008 DC's in my other domain's, the resolve-dns command is not present. So
How do I add it?
or
How do I change the domain request from the DC that I have that works?
I don't have an 08 to test on, but you can install newer powershell if you want
http://www.microsoft.com/en-us/download/details.aspx?id=34595
this is the command for powershell 2.0
[Net.DNS]::GetHostEntry("M achineName ")
so to integrate it back into the script, but I can't test it so I'm not sure the syntax is correct:
http://www.microsoft.com/en-us/download/details.aspx?id=34595
this is the command for powershell 2.0
[Net.DNS]::GetHostEntry("M
so to integrate it back into the script, but I can't test it so I'm not sure the syntax is correct:
$DCS = Get-ADDomainController -Filter *
foreach ($DC in $DCS){
[Net.DNS]::GetHostEntry("$dc.Name")
}
ASKER
All the DC's may not be in that OU. I strongly suspect I will have to pull the information from DNS (not all have NS records though, by design) or Sites and Services.