enable/disable a NIC remotely

  • Thread starter Thread starter James
  • Start date Start date
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.
 
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.
 
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

e6RzL.png
 
Back
Top