# Get-DnsServerResourceRecord seemingly returning all name servers in every zone

**URL:** <https://forums.powershell.org/t/get-dnsserverresourcerecord-seemingly-returning-all-name-servers-in-every-zone/14159>\
**Category:** PowerShell Help\
**Created:** [April 14, 2020, 10:42pm UTC](https://forums.powershell.org/t/get-dnsserverresourcerecord-seemingly-returning-all-name-servers-in-every-zone/14159 "2020-04-14T22:42:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![megabyte](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@megabyte](https://forums.powershell.org/u/megabyte)\
**Post date:** [April 14, 2020, 10:42pm UTC](https://forums.powershell.org/t/get-dnsserverresourcerecord-seemingly-returning-all-name-servers-in-every-zone/14159/1 "2020-04-14T22:42:01Z")

</div>

…not just for the one specified.

I have to check and then potentially update up to 400 zone nameserver records.

I thought I could turn to Powershell to do this in far less time, and eliminate any mistakes that would no doubt happen doing this manually. However the PS command I understand outputs Name Servers of a zone, is producing a list of more servers than is showing in the GUI (See images below).

On the thought that it was getting this list from all known name servers in the domain, I checked, and even this larger list is still 2 more than what the PS command is outputting, so I am at a loss as to where this list is coming from. Anyone know?

Curiosity aside, I need a cmdlet to output only the name servers in the zone I specify. If not this cmdlet, which one?

 ![https://i.stack.imgur.com/jBpnj.png](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/7/7ed8ea1cd2dbc290c2ba18c6cd034b64da9ecde2.png)

 ![Command Line query](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/2/23cdae72063de902d4c1e9ba9cd783293adb2977.png)

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:30pm UTC](https://forums.powershell.org/t/get-dnsserverresourcerecord-seemingly-returning-all-name-servers-in-every-zone/14159/2 "2024-05-16T20:30:12Z")

</div>


