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

Re: Reporting resource usage per VMfolder

$
0
0

Like this

 

Get-VM|Group-Object-Property {$_.Folder.Id} |
Select@{N="Folder";E={
 
$folder=$_.Group[0].Folder
 
$path=$folder.Name
 
while($folder.Parent){
   
$folder=$folder.Parent
   
$path=$folder.Name+"/"+$path
  }
 
$path
  }}
,
 
@{N="NumCPU";E={$_.Group|Measure-Object-PropertyNumCpu-Sum|Select-ExpandPropertySum}},
 
@{N="MemoryGB";E={$_.Group|Measure-Object-PropertyMemoryGB-Sum|Select-ExpandPropertySum}} |
Export-CsvC:\report.csv-NoTypeInformation-use

Viewing all articles
Browse latest Browse all 192300

Trending Articles



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