I am attempting to transfer files over PSRemoting from a Fedora 34 host running PowerShell 7.1.3 to a Windows 10 host that has Powershell remoting enabled using the following code:
$remotesession = new-pssession -computername remotecomputer -credential username
copy-item -path '/home/user/test7.xlsx' -Destination 'C:\Users\username\Desktop\wtf.xlsx' -ToSession $remotesession
I found that the file I am trying to send does not work, the program seizes up. A packet capture shows a few packets are sent back and forth, and then all network communication stops until I force close the program.
I tried a smaller file, and it worked, so I incrementally tried to transfer larger and larger files less than 500K until I found the same behavior. It turns out, if I try to send a file less than 278K (created using dd if=/dev/zero of=test9.xlsx bs=278K count=1
), the transfer works as expected. If the file size is above 279K, it will simply seize up
Is there some sort of limit on the file size for transferring files via PSRemoting, could this be a bug, or is there something simple that I'm missing here? thanks