Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: Error handling and Powershell

Receive-WinSCPItem is a cmdlet from WinSCP PowerShell Wrapper Module
So please ask there.

Though I assume you can handle its errors as with any other PowerShell cmdlet.
Google for "powershell handle errors".
See for example the try ... catch construct used in all WinSCP .NET assembly PowerShell (not WinSCP PowerShell Wrapper Module) examples:

Error handling and Powershell

Good Afternoon,
I am new to the world of WINSCP and Powershell.
In have written a script to get some files from a server, that works well. However I am trying to capture a success/fail parameter.

I am running the below command, if anyone know how to script testing for success or fail. I would be grateful.

Receive-WinSCPItem -localpath $localpath -RemotePath /users21/test/test.csv

Thank you