Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
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". –  Moses 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
add comment

2 Answers 2

up vote 1 down vote accepted

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

And if you need credentials:

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

share|improve this answer
    
Why the downvote? –  Moses Sep 13 '13 at 0:18
add comment

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.

share|improve this answer
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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