I am using invoke-webrequest command to load a file on server with POST command, and the file does get loaded. However the command hangs in console until I hit enter.
Here's what I m executing:
Invoke-RestMethod -Uri $url -Method POST -ContentType $ContentType -Headers $headerHash -InFile $filePath -TimeoutSec $timeOut
I am running powershell 3.0 on win2k12.
I ran the command with Verbose on, and it ask for confirmation to run the command as below. However when I provided -confirm:$true, invoke-webrequest suggests that there's no confirm command. I am not sure how to proceed.
Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"):
- Edited by Varun Vyas Wednesday, February 25, 2015 1:43 PM