Quantcast
Channel: psappdeploytoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1769

New Post: Including the '>' redirect character in the Parameters list in Execute-Process

$
0
0
I am trying to run the following command in the installation section of my install script.

$param1 = "/xmlout /catalog wsusscn2.cab >result.xml"
Execute-Process -Path mbsacli.exe -Parameters '/xmlout /catalog wsusscn2.cab >result.xml' -WindowStyle Hidden
If I just run:
Execute-Process -Path mbsacli.exe -Parameters '/xmlout /catalog wsusscn2.cab' -WindowStyle Hidden
then the process works fine, but as soon as I add the >reports.xml to the command, I get "Too many parameters passed" from the mbsacli.exe tool. However, according to the mbsacli tool, this is the proper way to run the command:
MBSACLI /xmlout /catalog c:\temp\wsusscn2.cab /unicode >results.xml
Is Powershell hitting the '>' character and going something weird?

Viewing all articles
Browse latest Browse all 1769


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>