A great many people are confused about the PowerShell run exe operation. If you are also searching for the answer, this post of MiniTool is worth reading. It illustrates 3 ways to execute exe from PowerShell Windows 10/11.

PowerShell is a powerful Windows built-in command-line shell and scripting environment tool. It’s widely used by people to deal with various works such as  PowerShell copy filesPowerShell gets folder sizeinstalling SSH PowerShellPowerShell unzip/zip files, etc.

However, a lot of users and even professionals don’t know how to perform these operations in PowerShell. This post mainly focuses on PowerShell run exe. Let’s keep reading to know more details.

CMD Ping Test: How to Ping from Command Prompt Windows 10/11
CMD Ping Test: How to Ping from Command Prompt Windows 10/11

What can you do with the CMD ping test? How to ping from Command Prompt Windows 10/11? How to read the ping test results? Now, you can get the answers here.

Read More

What Command Can Be Used to Run Exe from PowerShell

What command can be used to run exe in PowerShell Windows 10/11? After investigating extensive references, we found there are 2 main cmdlets – PowerShell Start-Process and Invoke-Expression to execute/run a .exe file.

With the PowerShell Start-Process cmdlet, you can enter a .exe file or script file that can be opened using a program on the local computer. The PowerShell Invoke-Expression cmdlet can run a .exe file or open a document file in the program associated with the document file type.

How to Run Exe from PowerShell Windows 10/11

How to let PowerShell execute exe on Windows 10/11? There are 3 simple ways that you can choose one according to your preference.

To execute exe from PowerShell smoothly, here we assume that the .exe file is located in the C:UsersAdministratorDownloads directory and the file name is partitionwizard.exe.

Note:

Make sure you replace the file directory/path and .exe file name according to your actual situation.

# 1. PowerShell Run Exe Directly

If you want to install exe with PowerShell directly, you can use the “.” parameter before the .exe file name. Here’s how to do that:

Step 1. Press the Win + R keys to open the Run box, and then type powershell in it and press Ctrl + Shift + Enter keys to open the elevated PowerShell window.

Step 2. In the pop-up window, type the following command and hit Enter to locate the directory where the partitionwizard.exe file is located.

cd C:UsersAdministratorDownloads

Step 3. Now, you should locate the Downloads folder. Run the following command and check if partitionwizard.exe exists in the directory.

Get-ChildItem

locate the exe file in PowerShell

Step 4. Type “.” before the partitionwizard.exe file to run exe from PowerShell script. Once done, the installer of partitionwizard.exe should start installing on the computer.

.partitionwizard.exe

install exe using PowerShell

# 2. PowerShell Run Exe via the Start-Process Cmdlet

Another command method for the PowerShell execute exe operation is to use the Start-Process cmdlet. To do this work, follow the detailed steps below:

Step 1. Open the elevated PowerShell window again as we explain above.

Step 2. Type the following command and hit Enter to locate the directory where the partitionwizard.exe file is stored. Then it should open the exe file and execute.

Start-Process -FilePath ‘C:UsersAdministratorDownloadspartitionwizard.exe’

run exe file using Start Process in PowerShell

Step 3. Alternatively, you can run the following commands one by one to execute the partitionwizard.exe file.

  • cd C:UsersAdministratorDownloads
  • Start-Process partitionwizard.exe

run exe file using Start Process

# 3. PowerShell Run Exe via the Invoke-Expression Cmdlet

In addition to the above 2 methods, you can install exe with PowerShell Invoke-Expression cmdlet on Windows 10/11. It’s very simple to operate. To do so, open the elevated PowerShell window, type the following command, and hit Enter to execute the partitionwizard.exe file.

Invoke-Expression -Command ‘C:UsersAdministratorDownloadspartitionwizard.exe’

Or

‘C:UsersAdministratorDownloadspartitionwizard.exe’ | Invoke-Expression

run exe using the invoke expression PowerShell command

CMD List Files: How to List Files in Command Prompt Windows 10/11
CMD List Files: How to List Files in Command Prompt Windows 10/11

How to list files in Command Prompt? If you are trying to figure it out, read this post now. It explains the Command Prompt list files operation in detail.

Read More

Further readingIf you enter some issues like file system corruption and low disk space on Windows 10/11, don’t worry. MiniTool Partition Wizard can help you fix them easily by checking file system errors, extending/resizing partitions, analyzing disk space, upgrading to a larger hard disk, etc.

  • linkedin
  • reddit