I make a pscustom object which looks like so
PS C:\...\acc> $csv
Count NonExistentUser
----- ---------------
1sht 1sht
2sht 21sht
I convert it
$csv = $csv | ConvertTo-Csv -NoTypeInformation
I upload it
$upload= Invoke-RestMethod -Headers $SessionHeader -Method Post -Uri $attachUri -Body $csv -ContentType 'multipart/form-data'
The upload works but the csv on the other end .... the whole csv is all on the same line when you download the csv from any other portal that stores attachments.
the output csv that is always uploaded is always on one line
"Count","NonExistentUser" "1sht","1sht" "2sht","21sht"
How do I add the link breaks to the end of each line before sending or converting?