What Is PsExec And How Does It Work?

What is PsExec? Read this post to fully understand what it is and how to use it.

Ellie

By Ellie / Updated on December 13, 2024

Share this: instagram reddit

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!

Stepwise tutorial on how to use PsExec

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

Part 1. 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
  • Enable administrative share ($admin) on the remote host
  • Get the administrator’s details

1. 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

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. 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

3. 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

Part 2. 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.

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

 Step 1. Download, install and launch AnyViewer on both computers.

Download AnyViewer

Step 2. Go to Log in, and then click Sign up. (If you already have signed up on its official website, you can log in directly.)

Log in AnyViewer

Step 3. Fill in the signup information.

Sign Up for AnyViewer

Step 4. Then you can see you successfully logged in to AnyViewer. Your device will automatically be assigned to the account you've logged in to.

Free Editions

Step 5. Log in to the same AnyViewer account on the two devices, then you can achieve unattended remote access by clicking One-click control.

Connect to My Devices

Notes:✎...
You can also upgrade your account to a Professional or Enterprise plan. What can a professional or enterprise plan brings to you:
Faster file transfer speed. Transfer speed for a free account is 500 KB/s, and for a paid account is up to 10 MB/s.
More devices can be assigned to the same account for unattended remote access.
Connect in privacy mode to protect privacy, which means the Controller can black the remote PC screen and disable the remote keyboard & mouse click.

Step 6. 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.

Conclusion

In conclusion, this post mainly introduces what PsExec is and how it works. If you want to achieve remote control, the whole process needn't be so complicated. You can use AnyViewer, the free and easy remote desktop software, helping you achieve remote control without effort.