Hi,
I am looking for powercli script to find out the vm or list of vms which are running with largest memory on a cluster.
Please help.
Try with
$clusterName = 'MyCluster'
Get-Cluster -Name $$clusterName |
Get-VM |
Sort-Object -Property MemoryGB -Descending |
Select -First 1 -Property Name,MemoryGB
This gives you the VM with the biggest amount of allocated memory, not necessarily the VM using the most active memory.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try with
$clusterName = 'MyCluster'
Get-Cluster -Name $$clusterName |
Get-VM |
Sort-Object -Property MemoryGB -Descending |
Select -First 1 -Property Name,MemoryGB
This gives you the VM with the biggest amount of allocated memory, not necessarily the VM using the most active memory.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks a lot LucD.