General discussion

Locked

How To Disable/Enable Lan Connection

By ykmraju ·
Hi All,
Do u have Any Idea How to Disable/Enable LAN Connection ThroughProgrammatically or Using Command Prompt.... in Windows.....

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by p.j.hutchison In reply to How To Disable/Enable Lan ...

Try the 'netsh' command for programming LAN connections.

Collapse -

by ykmraju In reply to

Poster rated this answer.

Collapse -

by ykmraju In reply to How To Disable/Enable Lan ...

Hi Hutchison,

Already I tried with Netsh command but it is not working.....

That Command is
******netsh interface set interface name="LAN1" admin=ENABLED *********

Hope to hear more from you!

Regards
YKMRaju

Collapse -

by Blackcurrant In reply to How To Disable/Enable Lan ...

Hi

Another solution may be to create a new hardware profile which does not include the network card. Using this method requires the user to choose between profile 1 (current) or profile 2 (without the card), when the machine is booted.

Collapse -

by ykmraju In reply to

Poster rated this answer.
Hai BlackCurrant,
I didn't get it , Need more Explanation plz....

Collapse -

by p.j.hutchison In reply to How To Disable/Enable Lan ...

1. Open System Control panel
2. click Hardware then Hardware profiles
3. By default you will have one Profile
4. Click Copy and enter new profile name
5. Reboot and select your new profile
6. When Windows loads, you can disable network cards in this profile. You can also disable Network Connections as well you don`t need.
7. Now you can select which profile to use when you boot up.

Collapse -

use devcon.exe for enable and disable lan interface ....

by raushanrakesh In reply to How To Disable/Enable Lan ...

use devcon.exe for enable and disable lan interface ....

Collapse -

Enable and disable LAN connection using Powershell

by power_ravi In reply to How To Disable/Enable Lan ...

To enable:

$shell = New-Object -comObject Shell.Application((($shell.NameSpace(0x31) | where {$_.Title -eq "Network Connections"}).Items() | where {$_.Name -like "Local*"}).Verbs() | where {$_.Name -eq "En&able"}).DoIt()


To Disable:

$shell = New-Object -comObject Shell.Application((($shell.NameSpace(0x31) | where {$_.Title -eq "Network Connections"}).Items() | where {$_.Name -like "Local*"}).Verbs() | where {$_.Name -eq "Disa&ble"}).DoIt()

Back to Windows Forum
8 total posts (Page 1 of 1)  

Operating Systems Forums