DNS Forwarders through WMI

Posted on 2004-11-23
Last Modified: 2008-03-03
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?
Question by:platinumbay
    LVL 1

    Accepted Solution

    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

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

    LVL 6

    Author Comment

    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.
    LVL 1

    Expert Comment


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Article by: Kraeven
    Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
    Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now