What is CMD?
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.
Method 1. Send a control request to your partner
Step 1. Install and open AnyViewer on the devices. Input the Partner ID (device ID) of the host computer and then click Connect.
Step 2. Click Send a control request to your partner.
Step 3. On the host computer, click the green button to make the connection successful.
Methods 2. Input security code
Step 1. On the host computer, go to Settings > Recipient. Tick Set my security code and then set the permanent security code.
Step 2. Back to the main interface, you can see your Temporary security code, which could also be used for the remote connection.
Step 3. On the client computer, input the device ID of the host computer and then click Connect. Choose Input security code, then enter the security code and click OK.
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.