Script to find all virtual machines with ballooning memory

This script will list all virtual machines with ballooning memory:

$findball = @()
foreach($vm in (Get-View -ViewType VirtualMachine | Where-Object `
{$_.Summary.QuickStats.BalloonedMemory -ne “0”})){
$select = “” | Select-Object VM, `
BalloonedMemory

$select.VM = $vm.Name
$select.BalloonedMemory = $vm.Summary.QuickStats.BalloonedMemory

$findball += $select
}
$findball

Leave a Comment

Your email address will not be published. Required fields are marked *