Powershell run batch file

broken image
broken image

How can I run myfile.bat param1 param2 param3, and get these arguments/parameters be passed to my PowerShell script? My question/request: How can I run myfile.bat param1 param2 param3, and get these arguments/parameters be passed to my PowerShell script? I'd really appreciate a minimal example that just prints the parameters through PowerShell's write-host. It runs and calls PowerShell and writes that message. If I put all this in a batch file, say, myfile.bat. The following is what I have right now, where I stripped the complicated parts of SaveFileDialog, and left a simple batch + PowerShell part: Specifically: I need a SaveFileDialog for some application. Why I need this? Because I need to run a simple batch file to do some stuff, but I need advanced functionality that works only from PowerShell. The parameters should be passed from the batch file to the PowerShell script that is in the same file.I've been digging in this for a while, but I could not understand how this works.