Monthly Archives: March 2016

Active Directory : How to get IP address from DNS ?

$Zones = @(Get-DnsServerZone) ForEach ($Zone in $Zones) { If ($Zone.ZoneName -eq “xxx.domain.xxx”) { $Record = $Zone | Get-DnsServerResourceRecord | Where {$_.HostName -Match “intranet”} $Record.RecordData | Out-File “c:\dns.txt” Write-Host $Record.RecordData.Ipv4Address } }

Posted in Uncategorized | Leave a comment