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

Re: Lessons on looping and global variables in functions

$
0
0

There is no need to insert a dummy record, just order descending on the number of properties of each object.

Something like this

 

$VMatSite|Get-VMInfo|
Sort-Object
-Descending-Property {$_|Get-Member|Measure-Object|Select-ExpandPropertyCount} |
Export-Csvd:\scripts\server-report\$Location-VMReport.csv-NoTypeInformation

 

The disadvantage is that your CSV file will not be ordered in a nice way


Viewing all articles
Browse latest Browse all 252940

Trending Articles



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