By Ellie / Last Updated November 23, 2021

What is PsExec?

What is PsExec, or what is psexec.exe? PsExec is a tool that lets you execute processes on remote systems. It’s a little bit like a remote control program that provides you with access to other computers and systems. But the difference is that PsExec allows you to control a remote computer with commands sent via Command Prompt, while a remote control program allows you to control a remote computer via your mouse and keyboard.

PsExec can run on all Windows versions. Like RDP, you don’t have to download any software as it is an administrative tool. Let’s learn how to use it next!

How to use PsExec?

Before finally using PsExec, there are a few steps you need to take to set it up first.

How to set up PsExec?

In the setup process, there are three basic prerequisites you’d need to put in place.

Turn on File and Printer Sharing

To use PsExec, File and Printer Sharing must be enabled on both the local and remote host.

Step 1. Navigate here: Start > Settings > Network & Internet. Scroll to Network and Sharing Center, then click it.

network-sharing-center

Step 2. Click the Change Advanced Sharing Settings.

change-advanced-sharing-settings

Step 3. Select Turn on File and Printer Sharing and save changes.

turn-on-file-and-printer-sharing

Enable Administrative Share ($Admin) on Remote Host

The remote computer should also have its administrative share ($admin) enabled and set up correctly.

Step 1. Press Win + R and then type in “lusrmgr.msc”, and press OK.

lusrmgr.msc

Step 2. Click Users. Find and right-click Administrator and then choose Properties.

user-administrator

Step 3. Uncheck the Account is disabled checkbox and click OK.

account-is-disabled

Get the Administrator’s Details

To make PsExec work normally, the correct user credential of the remote computer is also needed, i.e., the IP address, the administrative account username, and password. If you don’t know how to find the IP address and the username, follow the steps below.

Step 1. Press Win + R, then type in “cmd” and press OK. Then type “ipconfig” and press Enter. Now you can see a group of IP addresses, of which the IPv4 address is the one you need.

find-the-computer-name-in-the-console

Step 2. Then type “query user” to get the username.

find-the-username-in-the-control-panel

How to use PsExec?

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.

extract-all-files

Step 3. Open the folder where the extracted file is located. Enter “cmd” in the search box and then press Enter.

search-cmd

Step 4. Then the Command Prompt in that folder will open. You can now run commands through PsExec.

cmd-pstools

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

ipconfig-psexec

Easy remote control software: AnyViewer

After reading the above content, you already have a relative understanding of what PsExec is and how it works. For most new users, the above steps are quite complicated, including the process to set up PsExec, the way to find the IP address and username of the remote computer, and the need to enter the correct commands.

Actually, it’s not always this difficult to remotely access another system. For example, you can use the free yet professional remote access software, AnyViewer, which enables you to easily access a computer or multiple computers remotely. You don’t need to query the IP address or the username. You don’t need to enter complex commands anymore. You can see the screen of a remote computer and control it as if you were sitting in front of it in just a few steps.

To achieve remote access with AnyViewer, you have two options. You can choose either to send a control request to ask for remote control or to input a security code to achieve unattended remote access.

Download Freeware Win 11/10/8.1/8/7/XP
Secure Download

Methods 1. Send a control request

Step 1. Download and open AnyViewer on both devices. Input the device ID of the host computer and then click Connect.

Connect

Step 2. Click Send a control request to your partner.

Send a Control Request to Your Partner

Step 3. On the host computer, click the green button to make the connection successful.

Request to Control Your Device

 Methods 2. Input security code

Step 1. On the host computer, go to Settings > Recipient. Tick the third option and then set the permanent security code.  

Accept Remote Control

Step 2. On the client computer, input the device ID of the host computer and then click Connect.

Connect

Step 3. Choose Input a security code and click OK (the controller can input either the permanent security code or the temporary security code of the recipient).

Security Code

After successfully connecting, you can fully control the remote computer. For example,  you can access any file and folder, update the computer system, fix any computer problem, etc.