I'm setting up an automatic infrastructure orchestration of Windows 2012R2 machines using Ansible. I am creating domain controllers and DNS machines (resolvers, root servers and authoritative name servers). This infrastructure is not connected to the Internet.

I am providing specific forwarders in the domain controllers (to the resolvers). I am also actively removing all default root hints from the domain controllers DNS (I don want root hints here, these are for the resolvers). I have not removed the cache.dns file (yet). How can I disable the option to use the root hints if no forwarders are available using a Powershell command?

I have searched for any cmdlet on Microsofts' site, but have not found anything of use. This may perhaps also be some registry hack to be performed, but I don't know where to look.


You could try the Set-DnsServerForwarder cmdlet, with -UseRootHint $false parameter :

Set-DnsServerForwarder -UseRootHint $false

-UseRootHint < Boolean >

Prevents the DNS server from performing iterative queries. If you set UseRootHint to $false, the DNS server forwards unresolved queries only to the DNS servers in the forwarders list and does not try iterative queries if the forwarders do not resolve the queries.


  • Yes, that's it. I somehow overlooked this cmdlet, because I used the Add-DnsServerForwarder, which does not have this parameter. Thanks. – nojevive Sep 14 '17 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.