Invoke-WebRequest -Headers $headers -Method "POST" -Uri $uri -InFile $fileToAttach
In the above web request:
When I run this command, does the $fileToAttach download to my PC (in memory?) and then the file is sent to $uri? If not, what is the chain of events that happens?
A quick test with Wireshark showed that Invoke-WebRequest
, in order:
$uri
-InFile
file from the remote server into memory,