Re: enable/disable a NIC remotely

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 07/09/04


Date: Fri, 09 Jul 2004 11:45:12 +0200

Feng Mao wrote:

> 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.

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/community/scriptcenter/default.mspx


Relevant Pages

  • Re: Re: remothly change IP configuration with netsh
    ... the issue is that NETSH command it haves the option to ... changes are applied to the remote computer not the local ... using the set machine global Netsh command. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: WMF mitigation: Running regsvr32 on remote computers with PsExec - RESOLVED
    ... > This command unregisters shimgvd.dll on a single remote computer. ... run the same command but without the /U switch. ... > Frank Denman ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Run command on remote computer
    ... You can e.g. use WMI for this, but to be able to access network resources ... Install Software on a Remote Computer ... couple of command line utilities you might want to try out: ... Microsoft MVP Scripting and WMI, ...
    (microsoft.public.scripting.vbscript)
  • RE: enable/disable a NIC remotely
    ... This utility is named DEVCON. ... DevCon Command Line Utility Alternative to Device Manager ... when you try to disable the device on the remote computer. ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.win2000.general)
  • Re: batch file to run "iisreset"
    ... Administrators group of each of these boxes. ... iisreset.exe can take a remote computer name on the command line, ... feed the iisreset.exe command with computer names from e.g. a text ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx. ...
    (microsoft.public.windows.server.scripting)