I'm trying to write a PowerShell Script to connect to a server that is outside my domain.
Inside the script, I'm passing a PSFTP (PuTTY) Connection string to connect to the server.
I'd like to know how to determine if the connection was successful or it failed? Is there any return code to PSFTP command that the scripts can catch based on which I'll be able to determine?
Thanks.