Re: WinSCP Powershell script getting error on first 2 or 3 times then starts working
Please post full session log files from failing and working session.
Exception calling "Open" with "1" argument(s): "Connection has been unexpectedly closed. Server sent command exit
status 0.
Authentication log (see session log for details):
Using username "shakcorp".
Server refused our key.
Authentication failed."
At C:\payment-upload-scripts\payment_upload_script.ps1:59 char:7
+ $session.Open($sessionOptions)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : SessionRemoteException