How do I take control of someone else's computer using CMD?
"Can I take control of someone else's computer using CMD? If it is possible, how do I perform it?
- Question from Spiceworks"
CMD is an abbreviation of Command Prompt. It is a command-line interpreter that runs on almost all Windows operating systems. It's utilized to carry out commands that have been entered. The majority of those commands use scripts and batch files to automate tasks, perform advanced administrative functions, and troubleshoot or resolve specific Windows issues.
How to take control of another computer with CMD?
How to take control of another computer with CMD on Windows 10? Here we sort out two ways. You can use PsExec to control a remote computer with commands, or you can use Command Prompt to evoke Windows Remote Desktop to remotely control another computer.
Method 1. Use PsExec with CMD
Using PsExec with CMD to remote control another computer is relatively complicated. The steps are divided into four parts, of which the first three parts are setup steps:
- Turn on file and printer sharing
- Enable administrative share ($admin) on the remote host
- Get the details of the remote host
- Use PsExec with CMD to remotely control another computer
Part 1. Turn on file and printer sharing
The File and Printer Sharing should be turned on both the local and remote host.
Step 1. Navigate here: Start > Settings > Network & Internet. Find and click Network and Sharing Center.
Step 2. Click the Change advanced sharing settings.
Step 3. Select Turn on file and printer sharing and save changes.
Part 2. Enable administrative share ($admin) on the remote host
The remote computer should also have its administrative share ($admin) enabled and set up correctly.
Step 1. On the remote host, press Win + R, then type in “lusrmgr.msc” and click OK.
Step 2. Click Users. Find and right-click Administrator and then choose Properties.
Step 3. Uncheck the Account is disabled checkbox and click OK.
Part 3. Get the details of the remote host
The IP address and user name of the remote host are also needed for the remote control.
Step 1. On the remote host, search for Command Prompt in the Search box, and then click Run as administrator.
Step 2. Type in “ipconfig” and press Enter. Now you can see a group of IP addresses, of which the IPv4 address is the one you need.
Step 3. Then type in “query user” to get the username.
Note: You’ll also need the IP address and User name of the remote host in Method 2.
Part 4. Use PsExec with CMD to remotely control another computer
After you have finished the setup process, now you can start to use PsExec.
Step 1. Download PsExec on the computer that will be running the remote commands.
Step 2. Right-click on the ZIP file downloaded and select Extract All.
Step 3. Open the folder where the extracted file is located. Enter “cmd” in the search box and then press Enter.
Step 4. Then the Command Prompt in that folder will open. You can now run commands through PsExec.
Step 5. The next thing you need to know is to understand the syntax of PsExec to type in effective commands. You need to enter the PsExec commands with the following form:
psexec [\\computer[,computer2[,...] | @file\]][-u username [-p password][-n s][-r servicename][-h][-l][-s|-e][-x][-i [session]][-c executable [-f|-v]][-w directory][-d][-][-a n,n,...] cmd [arguments]
We’ll use an example to help you comprehend this better. To perform the ipconfig command on a remote system with an IP address of 192.168.122.66, a username of Administrator, and a password of 123456Ww, open a PsExec CMD console and type:
$ psexec \\192.168.122.66 -u Administrator -p 123456Ww ipconfig
Method 2. Open Windows Remote Desktop with CMD
How to remotely access another computer using CMD? You can use Command Prompt to evoke Windows Remote Desktop to remotely control another computer. But before this, please make sure you’ve set up Windows Remote Desktop properly.
Step 1. Open Command Prompt, then type in “mstsc” and press Enter to evoke the Windows Remote Desktop.
Step 2. Enter the Computer and User name of the remote computer to remotely control it.
Note: You can also add additional terms at the end of the command to take you straight to the login screen of Remote Desktop Connection. Type in the following command:
mstsc /console /v:COMPUTERNAME
The COMPUTERNAME here means the actual computer name of the remote computer, for example, the remote computer I’m trying to log in to is Vivian PC.
AnyViewer: Take control of another computer with a desktop shortcut
Taking control of another computer with CMD sometimes can be very troublesome. Actually, there is another way to allow you to control another remote computer more easily. You can use AnyViewer, free remote access software for multiple Windows versions, including Windows 10. Once you’ve downloaded it, there will be a desktop shortcut. You can start to remotely access another computer right away with just an easy click. Let’s see how to use it next.
Step 1. Download, install and launch AnyViewer on both computers. Go to Log in, and then click Sign up. (If you already have signed up on its official website, you can log in directly.)
Step 2. Fill in the signup information.
Step 3. Then you can see you successfully logged in to AnyViewer. Your device will automatically be assigned to the account you've logged in to.
Step 4. Log in to the same AnyViewer account on the two devices, then you can achieve a direct connection by clicking Remote control.
- You can upgrade your account to a Professional or Enterprise plan. Then you'll have the following rights:
- Assign more devices to achieve unattended remote access to more devices.
- Connect to another computer in privacy mode, which means you can black the screen and block the mouse and keyboard of the remote computer.
- Transfer files at a faster speed. Transfer speed for a free account is 500 KB/s, and for a paid account is up to 10 MB/s.
How to take control of another computer with CMD on Windows 10? You have two options. First, you can use PsExec with CMD to remote control another computer; second, you can use Command Prompt to evoke Windows Remote Desktop to remotely control another computer. However, both ways require a complicated setup process, which is not very user-friendly to computer novices.
Therefore, we give you a third option. You can use AnyViewer, easy and free remote access software. You can open it quickly by clicking the desktop shortcut. Then with a few easy setup steps, you can start to take control of another computer.