Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 472
  • Last Modified:

DNS Forwarders through WMI

I have the Management (WMI) Extension for VS.NET 2003, which includes DNS control.  I am running DNS locally on my laptop, so I don't have to remember IP's and ports for all my local dev stuff.

The problem is that I use my laptop both at work, and at home, with different forwarders at both places.  I have to manually switch them when I go to either place.  I can't seem to find the forwarders in the Mgmt. Extensions.  Are they there?  How can I change them programatically?
0
platinumbay
Asked:
platinumbay
  • 2
1 Solution
 
MrUnleadedCommented:
I know this isnt WMI....but it may help you as it is a programmatic solution.

With the windows Support Tools, on your Server CD in \Support\Tools

the following command can be used to change your forwarders
dnscmd <SERVER NAME> /ResetForwarders <FORWARDING ADDRESS> <FORWARDING ADDRESS> ...

And this to delete forwarders:
dnscmd <SERVER NAME> /ResetForwarders



HTH
0
 
platinumbayAuthor Commented:
My friend, I don't care what they say, you ROCK! :P

I built 2 bat files, for home and work.  This is awesome.  Next step will be to detect when I change networks, and run the commands automatically.
0
 
MrUnleadedCommented:
Thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now