Solved

Adding secondary DNS

Posted on 2011-09-21
3
206 Views
Last Modified: 2012-05-12
Need help to write a script to add secondary dns in the network computers. User that were logged into the pc's are not admin.
0
Comment
Question by:tech1guy
3 Comments
 
LVL 15

Assisted Solution

by:Ian Meredith
Ian Meredith earned 240 total points
ID: 36577923
Have a look at these two links - you will find vb code for what you're wanting to do.

If you add your script as a startup object in Group Policy you won't need to worry about users not be admins.


http://www.petri.co.il/forums/showthread.php?t=17235

http://www.computing.net/answers/programming/vbscript-to-change-ip-and-dns/21362.html
0
 

Author Comment

by:tech1guy
ID: 36578395
I prefer not to use vb....I prefer txt/bat..
0
 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 260 total points
ID: 36578688
Check if you are interested in NETSH utility (built-in one). You can use it to set up IP address or DNS servers
About NETSH utility
http://technet.microsoft.com/pl-pl/library/cc785383%28WS.10%29.aspx

For setting up static IP with DNS (you can skip commands for IP address, use only part for DNS) at
http://www.petri.co.il/configure_tcp_ip_from_cmd.htm

NETSH can be used with -r switch to make settings on remote computer.

But I'm wondering why you don't want to use DHCP server for that? You can set up in Scope options, option no 006 with all DNS servers list in your network. Clients will get those settings automatically.

Regards,
Krzysztof
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 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