Executing programs in Windows Powershell

I’m used to executing programs via Windows Command Prompt (cmd) by doing either

Setting the current directory to the executable location path, and then calling the executable
e.g.

>> cd C:ParentFolderChildFolder
>> MyExec.exe /Commands

OR

Entering the executable path and the executable in quotes
e.g.

“C:ParentFolderChildFolderMyExec.exe” /Commands

These options worked fine, but Powershell did not want any of it.

So…
I found that this format was the way Powershell would play ball

cd C:ParentFolderChildFolder
.MyExec.exe /Commands

Note the . before the executable. That’s the key.

 

Subscribe

0 comments