Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219035

Re: Exporting Group-Objects by entities to CSV

$
0
0

LucD wrote:

 

Split the grouping in 2 (1st the VM, then the timestamp).

Something like this

        $report | Sort-Object Time | Export-Csv ".\$($vmName).csv" -NoTypeInformation -UseCulture

    }

}

Hi Luc,

 

It indeed works, and I note the loop within a loop which countered my ForEach. I didn't think about defining the name higher up the order.

 

The bit I don't understand is the "encapsulation" of the $vmName in parentheses preceded by the additional $. Is there some information which you can point me at which explains why this is required?

 

Geoff

 

edit: Damn i was too early.... it seems that the name of the file is not the data which is contained in it. The file name contains the data of the VM immediately preceding it, ie 25146.csv contains the data of VM 25145.

 

Message was edited by: Syncr0s


Viewing all articles
Browse latest Browse all 219035

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>