I need to download a piece of text from an FTP server via PowerShell and get it as a string. After performing the required task, I need to upload it to the same server as a different file. The file must not be saved to the local storage at any point.
For a file on a regular HTTP server, the code would be (New-Object Net.WebClient).DownloadString($uri); for downloading and (New-Object Net.WebClient).UploadString($uri, $output);" for sending it to the server for processing via a POST request.