I'd like to stream a .tar archive from a Windows machine using PowerShell to a Linux machine and extract the archive from the stream. PowerShell pushes archive content to stdout and plink.exe stream content to receiving command line's stdin.
I've come up with the following command.
Get-Content file.tar | & plink.exe -C -agent "remote_host" "tar xf -"
However, the tar command does recognize the file's content only partially. What I'm missing or is there a better solution for the problem?
Error message:
tar: Skipping to next header
tar: Exiting with failure status due to previous errors