spottedmahn
spottedmahn

Reputation: 16031

Run An EXE in PowerShell

How do I 'execute' an exe from the PowerShell console?

I know in CMD I can enter the name of the exe and it runs, but that isn't working on PowerShell.

In the directory there's an exe called b2c.exe that I want to run.

Sample commands I Want to Run:

Working example in cmd prompt, and error message from PowerShell:

error details

working example in cmd prompt

Upvotes: 0

Views: 1300

Answers (2)

Marco
Marco

Reputation: 2092

See call operator

& "C:\path\to\b2c.exe" get-user
& "C:\path\to\b2c.exe" help
& "C:\path\to\b2c.exe" update-user a80a99a7-b018-42...

Upvotes: 2

Jim ReesPotter
Jim ReesPotter

Reputation: 465

I don't think powershell has the current folder in its search path, try:

.\b2c

Upvotes: 4

Related Questions