I use this command to download report results and save locally:
Start-TNReport -ReportId 123 -wait | Get-TNReportResult | Save-TNReportResult -Path C:\Temp\reports
The report format is PDF yet the file on disk ends with .zip. It is actually a PDF with a bad name. Here is the line where this happens:
Line 47
$filename = Join-Path -Path $Path -ChildPath "$($file.Name.Split([IO.Path]::GetInvalidFileNameChars()) -join '')-$($file.Id)-reportresults.zip"
This happens with all report types, PDF and CSV, that I've generated. I couldn't find an option to save the files directly without change the name or adding zip to them.
Am I doing something wrong with my command?
I use this command to download report results and save locally:
Start-TNReport -ReportId 123 -wait | Get-TNReportResult | Save-TNReportResult -Path C:\Temp\reports
The report format is PDF yet the file on disk ends with .zip. It is actually a PDF with a bad name. Here is the line where this happens:$Path -ChildPath "$ ($file.Name.Split([IO.Path]::GetInvalidFileNameChars()) -join '')-$ ($file.Id)-reportresults.zip"
Line 47
$filename = Join-Path -Path
This happens with all report types, PDF and CSV, that I've generated. I couldn't find an option to save the files directly without change the name or adding zip to them.
Am I doing something wrong with my command?