I'm running a curl command to upload a file to a server. It appears that this command writes to stderr in order to give status of how far it is in the upload process. Writes several lines. I want to suppress that output and capture the return information. Also, I want the command to return before starts to process the return information. The command is (I broke the line up to read more easily:
$uploadData = Start-Process -File C:\Tools\bin\curl.exe
-argumentList "--basic -g -u admin:admin -F file=@C:\ws\PRA_Collection\CCI\cci\Branches\V2.2\target\cci.zip -F name=cci -F version=2.0.0.5 --header `"Content-Type: multipart/form-data`" http://choprogdevapp:8080/mmc-console-3.3.2/api/repository"
-RedirectStandardOutput stdout.log
-RedirectStandardError stdErr.log
-wait