MicrosoftPowerShell
.EXE files, or executable files are something we see often.
you might also run executable (.exe) files directly fromWindows PowerShell.
In this article, we show you 4 methods to run .exe files directly inside PowerShell.

The commands discussed in the methods below can also be applied to PowerShell scripts.
Moreover, some of them even allow you to send parameters/values to the executable file.
In the example below, we will be running Rufus.exe located at C:\Users\Subhan\Downloads.

Of course, this will change for you according to the files path and its name.
All it needs is a path and the name of the file to run.
The executable file will now run.

Note that it is crucial that you use .\ while running an executable file directly.
Otherwise, it will be considered a PowerShell command and you may see an error.
Heres how:
Use the following cmdlet to run an executable file:
Thats it!

The executable file should now run.
Anything followed by the & call operator is considered a command by PowerShell.
This is the syntax to be used to run an executable file in PowerShell:
It is that simple.
0
Get weekly insights, tips and exclusive content delivered straight to your inbox.
Talk to us straight and get your questions answered right away
source: www.itechtics.com