Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute a Windows command on a remote PC?

Tags:

windows

cmd

Is it possible to execute a Windows shell command on a remote PC when I know its login name and password? Is it possible to do it using client PC's Windows shell?

like image 225
bubble Avatar asked Aug 13 '12 13:08

bubble


People also ask

How do you remotely use Command Prompt on another computer?

Type "mstsc /console /v:computername" into Command Prompt, with the specific computer name you wrote down earlier in place of "computername." This entry takes you straight to the login screen for your remote computer. After you log on, you can use the remote machine as if it is the one you're sitting infront of.

Which of the following is used to execute scripts on a remote computer?

Using the WS-Management protocol, Windows PowerShell remoting lets you run any Windows PowerShell command on one or more remote computers. You can establish persistent connections, start interactive sessions, and run scripts on remote computers.


1 Answers

If you are in a domain environment, you can also use:

winrs -r:PCNAME cmd 

This will open a remote command shell.

like image 88
user3744855 Avatar answered Sep 30 '22 10:09

user3744855