script library Set Ethernet to use DHCP
This commit is contained in:
parent
36a902a44e
commit
e58881c2bd
|
@ -470,6 +470,16 @@
|
|||
"category": "TRMM (Win):Network",
|
||||
"default_timeout": "90"
|
||||
},
|
||||
{
|
||||
"guid": "745bb7cd-b71a-4f2e-b6f2-c579b1828162",
|
||||
"filename": "Win_Network_DHCP_Set.bat",
|
||||
"submittedBy": "https://github.com/silversword411",
|
||||
"name": "Network - Set Primary NIC to DHCP",
|
||||
"description": "Enable DHCP on primary adapter",
|
||||
"shell": "cmd",
|
||||
"category": "TRMM (Win):Network",
|
||||
"default_timeout": "90"
|
||||
},
|
||||
{
|
||||
"guid": "6ce5682a-49db-4c0b-9417-609cf905ac43",
|
||||
"filename": "Win_Win10_Change_Key_and_Activate.ps1",
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
@echo off
|
||||
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
|
||||
|
||||
if "%version%" == "6.1" (
|
||||
rem Windows 7
|
||||
netsh interface ip set address "Local Area Connection" dhcp
|
||||
netsh interface ip set dns "Local Area Connection" dhcp
|
||||
)
|
||||
if "%version%" == "10.0" (
|
||||
rem Windows 10
|
||||
netsh interface ip set address Ethernet dhcp
|
||||
netsh interface ip set dns Ethernet dhcp
|
||||
)
|
Loading…
Reference in New Issue