Looking for a powershell cmdlet or script to collect nameserver details from reverselookup zone RRS feed

  • Question

  • Hi,

    I have a task to remove nameservers from reverselookup zone properties which doesn't exist in the environment.

    If i go to the properties of reverse lookup zone, under name server it will shows me server name and IP address. There are couple of entries where server name doesn't have IP address and it says unknown. I would like to pull that data from all reverse lookup zone and delete it.

    Looking for cmdlet to find the same which I can further use it in powershell to run in loop to query multiple zone.

    • Edited by nit58 Friday, December 23, 2016 6:34 AM
    Friday, December 23, 2016 6:32 AM


  • Hi,

    Trying this:

    Get-DnsServerResourceRecord -ZoneName '<your dns zone name>'-RRType 'NS'  -Node | ?{$_.RecordData -like 'unknown'} | Remove-DnsServerResourceRecord -Verbose 

    Run powershell console with admin privilege.

    Best regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    • Edited by Hello_2018 Tuesday, December 27, 2016 11:18 AM
    • Proposed as answer by John Lii Wednesday, December 28, 2016 2:06 AM
    • Marked as answer by nit58 Monday, January 9, 2017 3:10 AM
    Tuesday, December 27, 2016 11:17 AM

All replies