I've been trying to enable or disable a NIC on Windows 2003 Server from a Windows 2008 Server PC. After googling around a bit, the command should be something like this:

netsh -r remotecomputer interface set interface "interface name" disabled

But when I try it, I get this error: "The newname and enable/disable option for LAN interfaces is not valid when administrating a remote machine".

I have admin access on both systems, and they are on the same LAN.

Anybody knows the right way to do it?

  • 1
    once you remotely disable it, how would you remotely enable it? – Keltari Sep 12 '13 at 14:41
  • 1
    I think we're assuming that he's a good little administrator and has out of band access methods to get back into it. – PsychoData Sep 12 '13 at 14:42
  • 1
    I'm pretty sure that's by design. You might want to try Psexec and the command "locally". – user201262 Sep 12 '13 at 14:43
  • @Keltari as PsychoData said I have more than one NIC on the remote PC. I thought I could use one of the others to disable and bring back the one I need – f.cipriani Sep 12 '13 at 14:57
  • @moses I was able to enable and disable the NIC using Psexec: psexec.exe \\remotecomputer netsh interface set interface "interfacename" disabled if you make it an answer I'll be glad to accept it – f.cipriani Sep 12 '13 at 15:10

By design, turning off a NIC is disallowed when done remotely.

Running with Psexec essentially runs the command as a local user, to bypass this restriction.

psexec.exe \remotecomputer netsh interface set interface "interfacename" disabled

If you need credentials:

psexec.exe \remotecomputer -u username -p password netsh interface set interface "interfacename" disabled


I'm pretty sure this is a "by design" feature to prevent you from locking yourself out. I remember running into a similar issue years ago.

  • 1
    This would make a good comment, but you don't provide any kind of a solution in this answer. Once you have more rep you will be able to comment on other questions – Scott Chamberlain Sep 12 '13 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.