Closed InsideFR closed 5 months ago
This fork is the best I can really do with the existing code, I can't really improve it any more without some massive changes and I have no plan to do so. Overall I'm not surprised that copying a file doesn't work, it does push the limits of the WinRM protocol.
Thank you Jordan for taking time to respond to me. I understand. Well done for your fork. Best regards.
SUMMARY
When I use the cmdlet "Copy-Item" using a PSSession, sometimes I get an error very regularly. It seems this cmdlet is not stable. You can use this code below executed from powershell 7.4 on GNU/Linux to reproduce the problem.
PowerShell script used :
File "random_file-1.txt" used (Endoding : UTF-8 with CRLF) :
Result 1 :
Result 2 :
Result 3 :
Resume :
Sometimes the copy is working and sometimes it's not working (I get internal error from WinRM service of the remote computer). I tried to undestand the issue with wireshark analysing. I catched the last HTTP frame (http code 500 'Internal error' from remote computer) and when I decrypt the stream "application/http-spnego-session-encrypted, i saw the WSMan fault : "The input/output operation was aborted due to thread termination or application request". When I used the same powershell script between 2 windows computers always is OK, I managed to make 100 copies. I don't understand where is the issue, could you help me?
MODULE VERSION
OS / ENVIRONMENT
Output "hostnamectl"
Output "pwsh -version"
PowerShell 7.4.1
Output "Get-Host"