Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Show Network Adapters


  • Please log in to reply
3 replies to this topic
thinkstorm
  • Members
  • 40 posts
  • Last active: Sep 10 2014 06:06 PM
  • Joined: 17 Aug 2004
Very easy
TC

#i:: Run, control ncpa.cpl



beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004
Does anyone know how to enable / disable the adapters without bringing this screen up and right clicking on them and selecting enable / disable?

thanks,
beardboy

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
I pulled up a few things from Google newsgroups (not everyone knows how useful it can be to search the newsgroups this way):

http://groups.google... ... .de&rnum=2

netsh interface set interface name="Local Area Connection" admin=DISABLED
or
netsh interface set interface "Local Area Connection" DISABLED

But you might get an error message (I did) as described in the KB Article: Error Message When You Use Netsh.exe to Enable or Disable a Network Adapter -- http://support.micro... ... -us;262265

In which case do as the article suggests and change the IP address settings. I used this command which seem quite effective in disabling the interface (its one long line):-
netsh interface ip set address "Local Area Connection" static 10.0.0.1 255.0.0.0 10.0.0.1 1

If the interface was using DHCP, it can be enabled using:-
netsh interface ip set address "Local Area Connection" dhcp

Other references:
How to Use the Netsh.exe Tool and Command-Line Switches -- http://support.micro... ... -us;242468

How to Use the NETSH Command to Change from Static IP Address to DHCP in Windows 2000 - http://support.micro... ... -us;257748

Shell.Application/VBScript
From: Michael Harris ([email protected])
Subject: Re: How to disable-Enable Local area Connection via script
Newsgroups: microsoft.public.scripting.vbscript
Date: 2002-03-25 11:36:10 PST
http://groups.google... ... kmsftngp05

Devcon.exe maybe?
Take a look at this thread:
From: Jon ([email protected])
Subject: Enable/disable network adapter
Newsgroups: microsoft.public.win2000.cmdprompt.admin
Date: 2002-02-28 11:43:59 PST
http://groups.google... ... ae&rnum=12


For more information about devcon.exe (W2K/XP DDK)
Message-ID:
From: Stephane Barizien ([email protected])
Subject: Re: Command-line equivalent to Device Manager's "Scan for hardware
changes"
Newsgroups: microsoft.public.win2000.cmdprompt.admin,
microsoft.public.win32.programmer.wmi
Date: 2002-01-07 02:00:08 PST
http://groups.google... ... kmsftngp07

- and -
this MS Knowledge Base article:
http://support.micro... ... US;q311272

beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004
Thanks for the info Chris.

thanks,
beardboy