Category Archives: DNS

Test DNS servers

Had a recent comment about testing DNS servers which got me thinking how do I test DNS servers. I decided I wanted to get the DNS server address from the client, ping the DNS server to test network connectivity and … Continue reading

Posted in DNS | Leave a comment

Finding DNS static records

An interesting question from the forums about finding DNS static records You can view the records in a DNS zone Get-CimInstance -Namespace root\MicrosoftDNS -ClassName MicrosoftDNs_Atype -ComputerName W16DC01  -Filter “DomainName = ‘’” | select OwnerName, Timestamp, IPAddress but how do you … Continue reading

Posted in DNS, Powershell, PowerShell and CIM | Leave a comment

Creating DNS records

Following on from my previous post about creating a reverse lookup zone in DNS here’s a function to create records in that zone. The function takes an IP address and name (of host) and uses Add-DnsServerResourceRecordA  to add the record … Continue reading

Posted in DNS, Powershell, Windows Server 2012 R2 | 1 Comment

Create a reverse lookup zone

I needed to create a DNS reverse lookup zone for my test environment. With Windows Server 2012 R2 I’ve got cmdlets available for managing DNS servers – the DnsServer module. You need to install the DNS role or the DNS … Continue reading

Posted in DNS, Powershell, Windows Server 2012 R2 | Leave a comment

NSlookup in PowerShell

nslookup.exe is a command line executable that is used to discover the IP address of a remote machine from its FQDN. The results look something like this: PS> nslookup powershell.orgDNS request timed out.    timeout was 2 seconds.Server:  UnKnownAddress: Non-authoritative … Continue reading

Posted in DNS, Powershell | Leave a comment

Error handling for DNS lookups

Interesting question on the forum regarding the Resolve-DNSname cmdlet. This is part of the DNSclient module introduced with Windows 8. If the DNS record is found everything is good £> Resolve-DnsName W12R2DSC -Server server02 | ft -a Name                   Type TTL  … Continue reading

Posted in DNS, PowerShell v5, Windows Server 2012 R2 | 1 Comment

Parsing ipconfig /displaydns with regular expressions

In yesterdays post I used a series of split operations to parse the strings produced by ipconfig /displaydns Regular expressions should give a more power full way to perform this task. Not being a big fan of regular expressions I … Continue reading

Posted in DNS, Networking, Powershell | Leave a comment