By Ellie / Last Updated April 8, 2022

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.

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

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

Connect

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.

Free Editions

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

Connect to My Devices

Note: You can also upgrade your account to Professional or Enterprise edition to assign more devices and to connect to another computer in privacy mode.

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.