I'm trying to output a table to a file but the text gets cropped in the output file.
$Data.items | Format-Table | Out-File $filename -Width 10000
$Data.items | Format-Table -AutoSize | Out-String -Width 4096 | Out-File $filename -Width 4096
$Data.items | Format-Table -AutoSize | Out-File $filename -Width 4096
$Data.items | Format-Table -AutoSize | Out-File $filename
How should I output the data to the file so it´s not cropped?
The $Data-object is the result from the Azure API to get consumption, example output can be found here: https://learn.microsoft.com/en-us/partner-center/develop/get-invoice-unbilled-consumption-lineitems#response-example-1