Invoke-WebRequest -Headers $headers -Method "POST" -Uri $uri -InFile $fileToAttach
In the above web request:
- $uri points to a public website.
- $fileToAttach points to a remote file share (Access via VPN).
- My connection is public internet (home internet), connected to above VPN to access the file share.
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?