Scripts Thread, SCRIPT TO ADD A SECONDARY DNS in Coding and Web Development; HI ALL,
I RECENTLY STARTED WORK AT A SCHOOL I AM STILL TRYING TO LEARN THE ROPES.
THE PREVIOUS NETWORK ...
-
7th March 2011, 02:34 PM #1
- Rep Power
- 0
SCRIPT TO ADD A SECONDARY DNS
HI ALL,
I RECENTLY STARTED WORK AT A SCHOOL I AM STILL TRYING TO LEARN THE ROPES.
THE PREVIOUS NETWORK ADMIN USED STATIC IP ADDRESS FOR EVERYTHING.
i HAVE RECENTLY INSTALLED A DHCP AND IT IS WORKING
I ALSO CONFIGURED A SECONDARY DNS WORKING AS WELL.
ALL NEW CONECTIONS WORK.
I NEED TO CHANGE THE OTHER 500 COMPUTERS.
CAN SOMEONE HELP ME CHANGE THE SECONDARY DNS ON ALL MACHINES OR SOMEONE HELP ME WITH A SCRIPT THAT WILL CHANGE SETTING TO USE DHCP
-
-
IDG Tech News
-
7th March 2011, 02:47 PM #2 If your clients can run a startup script from group policy then
Code:
netsh interface ip set address "Local Area Connection" dhcp
will do the job as long as they're not wireless. I think if they are wireless you need to change 'local area connection' to 'Wireless Network Connection'
-
-
7th March 2011, 02:47 PM #3 From the spiceworks website: Simple Script to Enable DHCP on Network adapters - Script Center - Spiceworks Community
The script is a VBS Script
Code:
' Enable DHCP
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each objNetAdapter In colNetAdapters
errEnable = objNetAdapter.EnableDHCP()
Next
-
-
7th March 2011, 02:50 PM #4 Welcome to edugeek, there are several approaches using netsh or vbscript, Cromertech's solution is probably the easiest for you to implement.
VBScript: Reset DNS to DHCP Assigned
PS please do not write all in CAPS it is very hard to read!
Last edited by somabc; 7th March 2011 at 03:09 PM.
-
-
7th March 2011, 03:00 PM #5 
Originally Posted by
djgreek
HI ALL,
I RECENTLY STARTED WORK AT A SCHOOL I AM STILL TRYING TO LEARN THE ROPES. ...
lesson #1: your caps key is between Shift and Tab.
-
-
7th March 2011, 03:07 PM #6 
Originally Posted by
powdarrmonkey
lesson #1: your caps key is between Shift and Tab.
Sorry, I know i shouldn't but... LOL!!!
-
-
8th March 2011, 11:40 AM #7
- Rep Power
- 0
ok so i used the netsh interface ip set address "Local Area Connection" dhcp
But there are so many different connection names
can i somehow join them
-
SHARE:
Similar Threads
-
By IrritableTech in forum Scripts
Replies: 13
Last Post: 22nd October 2010, 12:11 PM
-
By reggiep in forum Windows
Replies: 2
Last Post: 6th August 2008, 09:27 AM
-
By box_l in forum Scripts
Replies: 2
Last Post: 4th June 2008, 08:34 PM
-
By SimpleSi in forum *nix
Replies: 3
Last Post: 18th January 2008, 01:14 PM
-
Replies: 6
Last Post: 15th September 2005, 10:07 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules