enable/disable a NIC remotely


J

James

Is there a way to enable/disable a NIC on a remote computer from the command
line?
 
Ad

Advertisements

F

Feng Mao

Hi James,

Thank you for posting!

James, I can find the command utility to help you to disable or enable
device on local computer. This utility is named DEVCON. For additional
information about this utility, click the below hyperlink to view the
article in Microsoft knowledge base:

http://support.microsoft.com/?id=311272
311272 FILE: DevCon Command Line Utility Alternative to Device Manager

Although this utility has the option /m:\\machine name, it does not work
when you try to disable the device on the remote computer.

NETSH command can call RPC to remote change the network configuration on
the remote computer. However, the command

[Remote Computer Name] netsh interface> set interface [name = ] IfName [
[admin = ] ENABLED|DISABLED [connect = ] CONNECTED|DISCONNECTED [newname =
] NewName ]

can only be used to disable Non-LAN interface.

So, in my opinion, you may copy DEVCON to the remote computer, and run it
in its Terminal Sessions.

The above is the information I can found. It is possible there are some
third party utilities can help you to implement this. I can find the VC++
source code to remote disable/enable a network interface card in Internet.

Have a nice day!

Thanks & Regards,

Feng Mao [MSFT], MCSE
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security

=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

Torgeir Bakken \(MVP\)

Feng said:
Hi James,

Thank you for posting!

James, I can find the command utility to help you to disable or enable
device on local computer. This utility is named DEVCON. For additional
information about this utility, click the below hyperlink to view the
article in Microsoft knowledge base:

http://support.microsoft.com/?id=311272
311272 FILE: DevCon Command Line Utility Alternative to Device Manager

Although this utility has the option /m:\\machine name, it does not work
when you try to disable the device on the remote computer.

NETSH command can call RPC to remote change the network configuration on
the remote computer. However, the command

[Remote Computer Name] netsh interface> set interface [name = ] IfName [
[admin = ] ENABLED|DISABLED [connect = ] CONNECTED|DISCONNECTED [newname =
] NewName ]

can only be used to disable Non-LAN interface.

So, in my opinion, you may copy DEVCON to the remote computer, and run it
in its Terminal Sessions.
Hi

To run Devcon.exe remotely, you might be able to use PsExec.exe in
the free PsTools suite, found at
http://www.sysinternals.com

PsExec can even automatically copy a file (e.g. Devcon.exe) over
to the remote computer before it starts it.


Another freeware program with similar merits to PsExec is Beyondexec.
http://www.beyondlogic.org/consulting/remoteprocess/BeyondExec.htm

Beyondexec also have multiple computer functionality.
 
Ad

Advertisements

Joined
Dec 6, 2011
Messages
1
Reaction score
0
I found a program that does what you are looking to do, although it is GUI based on not command line driven. It's called NIC Padlock.

I've played around with it and it works as advertised. It also has some other nice features:

- Remotely disables all network adapters
- Choose to display a message to the user when NIC’s are disabled
- Remotely enables all network adapters
- Re-enable the adapters that were disabled after a configurable time period
- Retrieves a remote computer’s list of auto-run programs

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top