Native Commands in PowerShell A New Approach – Part 2 In my last post I went through some some strategies for executing native executable and having them participate more fully in the PowerShell environment. Usually, this is not enough, and we need to add some arguments to the command running (like the path to the script we want to execute). (note the full path to powershell.exe – C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe) Now we have a scheduled task which will start PowerShell in designated time, every single day. I thought that the Wait argument would suppress this. Is it an InstallShield installer? but not from powershell. My first issue is that when I run the installer.exe I get a pop up window asking do I want to run the installer.exe, this is by design when using the gui after double clicking on the exe file. Issues with simple execution. Also, note that all the parameters are after the -file "path\to\the\ps1\file.ps1" [parameters]) Finally, the Start in (optional) field should be added like this: C:\Users\jortega\Desktop\ (without quotes) We can remove the need to prefix commands with wsl, handle the translation of Windows paths to WSL paths, and support command completion with PowerShell function wrappers. For a command to feel like a native Windows command, we’ll need to address these issues. Does installer.exe have a switch for silent install? In this post, I’ll be going through a couple of experiments I’ve done with the kubernetes kubectl utility. If you must use the old cmd-style commands, launch an original cmd.exe with parameter /c (for “command”), issue the command, and process the results inside PowerShell. for now, i’m just trying to run an exe with parameters from powershell. The first one is related to the "powershell.exe -file" command and the second one is the file parameter of the script. the argument list has a bunch of quotes and backslashes in it. I need help with a method to run a .exe with parameters for a silent install on multiple remote PC’s. PowerShell Function Wrappers. The basic requirements of the wrappers are: Running a Command with Command Line Arguments Welcome › Forums › General PowerShell Q&A › Running a Command with Command Line Arguments This topic has 4 replies, 3 voices, and was last updated 1 year, 1 month ago by Just to make sure that command works the way you are expecting it to. If I want the native application just running the executable is not the only criteria for fully participating in the PowerShell environment. This explains why “dir” in PowerShell won’t support the switches and arguments it used to in cmd.exe and batch files, like “cmd.exe /w”. No change is needed, just run kubectl and you’re done! Problem Statement. my end game is to wrap this in invoke-command, to feed a list of PCs, and run the exe on all of them. Try chunking the entire argument list like so PowerShell is a great shell, it can execute any executable, the same way that any good shell can do. Otherwise it will just interprets it as a string and echos it back to you. There are several ways to make the command work, let me show you the one I found most convenient. ... Also it’s important to have the ampersand (&) in there so powershell knows you’re running a command. Use a normal command line (cmd) interface to run the command without the powershell bits. Currently, there are cases where cutting and pasting a native command line fails to run as expected in PowerShell. This may be due to incorrect parsing of quotes meant to be passed to the native command or use of PowerShell syntax that is not meant to be interpreted as PowerShell. Just writing the native command followed by its parameters in PowerShell host and hitting Enter is usually not enough to run the command successfully. I can run it from a command line and from a scheduled task.