Session.Dispose leaves sftp-server.exe ghost behind
I noticed that I could not manually remove a file just uploaded to a SFTP site by my PowerShell script using Session.PutFiles. This is because the file was locked by a sftp-server.exe process (started by New-WinSCPSession) hanging in the background, even though I could confirm that Session.Dispose was called once the file was uploaded.
Is there a way to properly terminate the sftp-server.exe process once the SFTP operations are completed?
I am using WinSCP-5.17.9-Automation and the WinSCP Powershell module 5.17.8.1.
Is there a way to properly terminate the sftp-server.exe process once the SFTP operations are completed?
I am using WinSCP-5.17.9-Automation and the WinSCP Powershell module 5.17.8.1.