Solved

Adding secondary DNS

Posted on 2011-09-21
3
205 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

11 Experts available now in Live!

Get 1:1 Help Now