I am running Powershell 7.1.4 in a Debian Buster Docker container and am trying to copy a file from the container to a remote Windows server. I can do this just fine for any file under 275K but cannot do this for any file 280K or larger.
I can copy my 280K test file from another Windows machine to the target server so I don't believe there is something strangely configured on my target server.
Here is the process I'm using to do the copy (commands taken from an application but run manually to verify the problem):
$password = "password" | ConvertTo-SecureString -asPlainText -Force
$username = "username"
$cred = New-Object System.Management.Automation.PSCredential($username,$password)
$copy_session = New-PSSession <server.fqdn> -credential $cred
# working copy-item command
Copy-Item -ToSession $copy_session /tmp/275k.txt -Destination F:\275k.txt
# copy-item command that hangs forever - no messages.
Copy-Item -ToSession $copy_session /tmp/280k.txt -Destination F:\280k.txt
# Test file details
-rw-r--r-- 1 root root 281600 Sep 3 18:49 275k.txt
-rw-r--r-- 1 root root 286720 Sep 3 18:50 280k.txt
The Copy-Item command for the 280k file never returns to the prompt, but just hangs there. CTRL+C doesn't work to stop the command, so I end up having to close the terminal session to stop it.
I can SCP other files from my docker container (not under Powershell) just fine with the same user account, so container local ulimits and permissions appear to be correct.
The only thing I can see different is the file size, but I'm not sure what setting or other configuration item is causing this behavior.
Any ideas?