Windows Server Powershell: configure automatic testing interval for DNS tests

AG 0 Reputation points
2023-02-09T18:36:30.1566667+00:00

Hi,

I want to write a powershell script which sets up my entire domain controller including the DNS server.
But I'm having trouble setting the following flags from the GUI within Powershell:

  • enable A simple query against this DNS server
  • enable A recursive query to other DNS servers
  • enable Perform Automatic testing at the following interval:
  • and specifying that Test interval

I couldn't find anything to set the DNS automated Testing options, except of this post from 2020, but that's more about executing the test from powershell. I don't want to execute the test. I want to configure the automatic testing setup via script.

(Also I cannot believe that there isn't a way to do this. There's got to be a function or flag which is called or set by the GUI itself. - If I need to use cmd or something else, I'd be fine with that, I'm just looking for a solution.)
User's image

Thanks!

Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2023-02-09T20:51:12.6866667+00:00

    The PowerShell cmdlets use WMI to manage DNS. I didn't see anything in the WMI DNS classes that would manage that setting. I also checked the dnscmd command line utility and it's not there, either.

    The GUI properties pages' "Monitor" tab is probably uses the DNS API to accomplish this. It might also be a registry setting, but I didn't find anything about that.

    0 comments No comments

  2. AG 0 Reputation points
    2023-02-12T21:59:06+00:00

    Okay, so I'll have to configure that one manually.
    Nevertheless thank you very much!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.