Page 1 of 1

How to run an exe from powershell instead of cmd

Posted: Wed Oct 07, 2015 4:58 pm
by motoxxiii
I know I can run a test plan from command prompt, but I actively powershell. It's nothing major, but I dislike having to open cmd.exe to run a test plan, when I already have powershell open.

I followed the steps for using cmd with powershell and I get the following error.
The term 'Quick_Test.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:14
any advise?

Thanks,
Aaron

Re: How to run an exe from powershell instead of cmd

Posted: Thu Oct 08, 2015 8:30 am
by odklizec
Hi and welcome here,

If you want to run exe from powershell, you need to call it like this:
PS c:\users\username . "c:\path\to\your\test.exe"
Notice the "." in front of the path to exe. This must be there! And if the path to exe contains spaces, you need to enclose the entire path in double quotes. Hope this helps?

For more details (and more ways) about running exes from powershell check this page:
http://social.technet.microsoft.com/wik ... ables.aspx