Interface Enable/Disable mystery using Netsh ?
Hi,
I just wanted simple thing - Enable/Disable my network interfaces using
command line interface.
I found this netsh interface context command:
netsh interface> set interface name="local area connection"
admin=enable/disable
And it works fine.
I use another command to display list, state of interfaces:
netsh interface> show intercace
!!! And it ALWAYS displays "Enabled" in "admin state" column ! - It doesn't
matter if interface is disabled or enabled - all interfaces are always
displayed as Enabled(admin state).
I misunderstanding something or what ? How do I display real state of my
interfaces ?
Please explain me.
thanks in advance
Vilius
Re: Interface Enable/Disable mystery using Netsh ?
netsh behaves differently on different Windows versions. You may try netsh
interface set interface "Local Area Connection" DISABLED. Also, if connect =
CONNECTED is specified, then the interface is automatically enabled even if
the admin = DISABLED option is specified. So, you may add connect =
disconnect. This link may help too.
netsh command
Netsh is a command-line scripting utility that allows you to, either
locally or remotely, display, modify or script the network configuration of
a computer ...
www.chicagotech.net/netsh.htm
--
Bob Lin, MS-MVP, MCSE & CNE
Networking, Internet, Routing, VPN Troubleshooting on
http://www.ChicagoTech.net
How to Setup Windows, Network, VPN & Remote Access on
http://www.HowToNetworking.com
"Vilius" <v_mockunas@yahoo.com> wrote in message
news:Ok6m90AKJHA.5232@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I just wanted simple thing - Enable/Disable my network interfaces using
> command line interface.
> I found this netsh interface context command:
> netsh interface> set interface name="local area connection"
> admin=enable/disable
> And it works fine.
> I use another command to display list, state of interfaces:
> netsh interface> show intercace
> !!! And it ALWAYS displays "Enabled" in "admin state" column ! - It
> doesn't matter if interface is disabled or enabled - all interfaces are
> always displayed as Enabled(admin state).
>
> I misunderstanding something or what ? How do I display real state of my
> interfaces ?
> Please explain me.
>
> thanks in advance
> Vilius
>
>