I wrote a short script that lets me download a file.
Invoke-WebRequest -Uri $r2.Forms.Action -WebSession $myWebSession -OutFile $destination$filename
The whole download is buffered in memory, which is obviously not optimal for larger files. I was wondering (and I couldnt find) a way/ property to prevent this and stream straight to disk. Something along the lines of AllowWriteStreamBuffering in .NET.
Out of Memory Exception When Using HttpWebRequest to Stream Large File
Any help is appreciated!