20 January, 2010

NIC Disable enable script...

Small script to disable and enable the NIC:

==================================================================
netsh int set int name="Local Area Connection" admin=DISABLED
if %errorlevel% NEQ 0 goto no_disable

netsh int set int name="Local Area Connection" admin=ENABLED
if %errorlevel% NEQ 0 goto no_enable
goto end


:no_disable
echo Could not disable
goto end

:no_enable
echo Could not enable

:end
pause
================================================================

No comments:

Post a Comment