Your script produces in fact output for the screen inside the Guest OS.
These formatting directives clutter up the result that is returned.
The better way to transfer data this way is to use okain text.
That is also why we used ConvertTo-Csv in the past.
And then on the receiving side you use ConvertFrom-Csv.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference