Category Archives: DNS

Get-DnsServerResourceRecord

You saw how to discover the zones on a DNS server in the first post in this series. Now its time to discover the records in a zone. For that you need Get-DnsServerResourceRecord. The syntax is: Get-DnsServerResourceRecord [-ZoneName] <string> [[-Name] … Continue reading

Posted in DNS, PowerShell v6 | Leave a comment

DNS zones

I’m working through the commonly used DNS server cmdlets to determine if everything works in PowerShell core. First up is the cmdlet to get the DNS zones on your DNS server. PS>  Get-DnsServerZone | Format-List -Property ZoneName, ZoneType,  IsAutoCreated, IsDsIntegrated, … Continue reading

Posted in DNS, PowerShell v6 | Leave a comment

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 = ‘manticore.org’” | 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:  192.168.0.1 Non-authoritative … Continue reading

Posted in DNS, Powershell | Leave a comment