so a very simplified version of what i need to achieve here
Enter-PSSession -ComputerName computer01
$result = .\hello.ps1
write-output “Hello world”
$result > c:\helloworld.csv
running the command on the local (computer01) produces a csv with the contents “Hello World”, however running this through invoke-command or enter-pssession created the file with a corrupt entry.
any help would be great