I have a number of scenarios in which I need to pass parameters to command line exes.
I\'ve seen a number of these answered to some extent on this site, but so far I
Just pass parameters like you would in your BAT file.
cd "$($env:ProgramFiles(x86))\Microsoft Visual Studio 10.0\Common7\IDE"
devenv /command "File.BatchNewTeamProject C:\stuff\Project51.xml"
That will pass two arguments to devenv.
Now, I have run into a few cases where an application requires that quotes be in the string you pass it. I had some trouble with this and thought that PowerShell was dropping the quotes. But it turns out that the real problem is that PowerShell does not escape the quotes. So you need to do this.
devenv /command '\"File.BatchNewTeamProject C:\stuff\Project51.xml\"'