1

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 missing 2, 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?

GUI query

Command Line query

user66001
  • 185
  • 2
  • 16
  • use the -ComputerName specification to ensure you are only querying the single DNS server rather than every DNS server hosting the forward lookup zone. – Citizen Apr 24 '20 at 00:38
  • @Citizen - https://docs.microsoft.com/en-us/powershell/module/dnsserver/get-dnsserverresourcerecord?view=win10-ps doesn't suggest that ommiting the -ComputerName parameter would query all DNS servers. Specifically it says "If you do not specify this parameter, the command runs on the local system.". I will of course test this later today and report back either way. – user66001 Apr 24 '20 at 09:05
  • I remember having an issue similar to yours about 6 months ago, I thought that I shared the fix. Interested to know if I steered you in the correct direction. Hope I gave you solid info. – Citizen Apr 24 '20 at 18:37
  • 1
    The command and arguments you're supplying all seem correct (At least in my testing). If the GUI doesn't match the results in your console, there is a good chance that you need to refresh (Right click on your "Test" zone -> Refresh) the GUI on. The DNS Manager and the DNS snap-in both don't automatically refresh sadly. – HiTech Sep 08 '21 at 21:59
  • @Citizen - Where was the fix shared? – user66001 Oct 29 '21 at 17:09
  • @HiTech - I tried that, with no change, unfortunately. – user66001 Oct 29 '21 at 17:10

0 Answers0