Upload file to SFTP using PowerShell

You didn’t tell us what particular problem do you have with the WinSCP, so I can really only repeat what’s in WinSCP documentation. Download WinSCP .NET assembly. The latest package as of now is WinSCP-6.1-Automation.zip; Extract the .zip archive along your script; Use a code like this (based on the official PowerShell upload example): # … Read more

Convert a batch-file command with complex arguments to PowerShell

Note: JamesQMurphy’s helpful answer is the best solution in this case. This answer generally discusses translating command lines written for cmd.exe to PowerShell. Translating cmd.exe (batch-file) command lines to PowerShell is tricky – so tricky, that in PSv3 pseudo-parameter –%, the stop-parsing token, was introduced: Its purpose is to allow you to pass everything that … Read more