Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

start-process question

$
0
0

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

The command open a command window, but does not appear to execute.  It also seems to crash my powershell ISE.  How can I get this command to run within powershell.  I can run it fine from the command promote.

Viewing all articles
Browse latest Browse all 8411

Trending Articles