Skip to content

Instantly share code, notes, and snippets.

@billkindle
Last active April 15, 2019 19:20
Show Gist options
  • Save billkindle/30fcb03b0f31d5972de8e602cd218f0e to your computer and use it in GitHub Desktop.
Save billkindle/30fcb03b0f31d5972de8e602cd218f0e to your computer and use it in GitHub Desktop.
I had to find out if a PTR existed or not. First time I got to use DNS PowerShelll cmdlets and ran into some minor issues.....
<# This link helped me solve the error I was recieving:
https://powershell.org/forums/topic/get-dnsserverresourcerecord-fails-on-dns-server/
Big thanks to Logan B.!
#>
# Using a splatted array here, will make final cmd shorter!
$splat = @{
Name = 'hostname'
ComputerName = 'DNSserverName'
zoneName = 'ZoneName'
# Uncomment the line below if you need to look for PTR
#RRType = 'Ptr'
}
# Profit!
Get-DnsServerResourceRecord @splat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment