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?
LVL 6
platinumbayAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.