Link to home
Start Free TrialLog in
Avatar of trojan81
trojan81

asked on

run cmd.exe remotely

experts,

I am on PC1 and I want to be able to run the cmd.exe on another in my network called PC2. I have full administrative rights to PC2.
I cannot remember the syntax to do this.  
Assume the credentials on PC2 is: admin and password

Do I open a command prompt on PC1 and then type in a RUNAS syntax?
Avatar of John
John
Flag of Canada image

Open the other computer with Remote Desktop Connection or like and then Start Run cmd.exe

That opens an command shell and you can run whatever you want.
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There use to be a resource kit utility that allowed remote commands but I think that died in 2003.  Certainly by the time Vista/2008 was available.

These days, you can use Powershell or PSEXEC (as mentioned above).  A discussion on both with examples can be found here:
https://www.opswat.com/blog/powershell-vs-psexec-remote-command-execution
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial