Re: Modifying DNS Settings for different subnets
- From: "S Moran" <s@xxxxxxxxx>
- Date: Wed, 18 Jul 2007 12:24:12 -0400
quick and easy way would be to run ipconfig via your script and parse the output...
or im sure WMI can get it for you
"William Anderson" <WilliamAnderson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:55BDC847-5D14-4F15-B147-D39D85B285A5@xxxxxxxxxxxxxxxx
Hey there guys,
I've written a script that installs an application, and the application
requires a specific DNS order for the machines in different subnets. The
problem is that I can't do a global GPO, because not everyone is getting this
software, and laptop users would then have a problem with accessing the
internet when they took it home.
What I need is a script that will check the machines gateway address, and if
it's a certain gateway, then it'll change the DNS settings according to
what's needed.
Example:
If gateway = 192.168.10.1
Then arrDNSServers = Array("192.168.10.2", "192.168.10.3")
ElseIf gateway = 192.168.50.1
Then arrDNSServers = Array("192.168.50.2", "192.168.50.3")
EndIf
If that makes sense...I know how to change the DNS settings for the
machine...it's pulling the default gateway address out of it. Any ideas?
Thanks again!
Best Regards,
.
- Follow-Ups:
- Re: Modifying DNS Settings for different subnets
- From: William Anderson
- Re: Modifying DNS Settings for different subnets
- Prev by Date: How to run multiple commands
- Next by Date: Re: How to run multiple commands
- Previous by thread: How to run multiple commands
- Next by thread: Re: Modifying DNS Settings for different subnets
- Index(es):
Relevant Pages
|