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

Re: Reporting resource usage per VMfolder

$
0
0

The following PowerCLI script will report the total number of virtual CPU's and MemoryGB per VM folder:

 

Get-Folder -Type VM |

ForEach-Object {

  $Folder = $_

  $VMs = $Folder | Get-VM

  $Folder |

  Select-Object -Property Name,

    @{N="TotalNumCpu";E={$VMs | Measure-Object -Property NumCpu -Sum | Select-Object -ExpandProperty Sum}},

    @{N="TotalMemoryGB";E={$VMs | Measure-Object -Property MemoryGB -Sum | Select-Object -ExpandProperty Sum}}

}


Viewing all articles
Browse latest Browse all 165945

Trending Articles



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