Below code prints output with empty lines in between. I have to manually copy output, remove empty lines and add comma in between and then copy to excel.
How can we have have output like or directly save in CSV
folder1, 12.34, 555,666
folder2, 0.44, 11,22
$paths = @("/folder1","/folder2")
foreach($path in $paths)
{
$details = Get-AzDataLakeStoreChildItemSummary -Account $Gen1Account -Path $path
$details | select @{name = "Folder"; expression = {$path}}, @{name="SizeInGB"; expression = {$_.length/1gb} } , DirectoryCount, Filecount | Format-Table -AutoSize -HideTableHeaders
}