Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turn DHCP on in registry

Status
Not open for further replies.

Shift838

IS-IT--Management
Jan 27, 2003
987
US
Is there a way to turn DHCP on in the registry instead of going through the GUI?
 
Would this be of use. Copy/paste below into a text file then rename the 'txt' file extension to 'bat'. You may need to tweak to match your adapter names.

Code:
@ECHO OFF
ECHO Set adapters for DHCP
 
ECHO Resetting IP Address and Subnet Mask For DHCP
netsh int ip set address name = "Local Area Connection" source = dhcp
 
ECHO Resetting DNS For DHCP
netsh int ip set dns name = "Local Area Connection" source = dhcp
 
ECHO Resetting Windows Internet Name Service (WINS) For DHCP
netsh int ip set wins name = "Local Area Connection" source = dhcp
 
ECHO Here are the new settings for %computername%:
netsh int ip show config
 
pause

I used to have a handle on life... but it broke. Cpt. Red Bull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top