Hi
I need to get VMs that are ballooning and swapping in all clusters in vcenter and exported to csv. I have this pCLI from the ICT-Freak
Thanks for the feedback.
$myCol = @()
foreach($clus in (Get-Cluster)){
foreach($vm in (Get-View -ViewType VirtualMachine | Where-Object `
{$_.Summary.QuickStats.BalloonedMemory -ne "0"})){
$Details = "" | Select-Object VM, `
SwappedMemory ,BalloonedMemory
$Details.Cluster = $clus.Name
$Details.VM = $vm.Name
$Details.SwappedMemory = $vm.Summary.QuickStats.SwappedMemory
$Details.BalloonedMemory = $vm.Summary.QuickStats.BalloonedMemory
$myCol += $Details
}
}
$myCol
$myCol | Export-Csv -NoTypeInformation C:\Output\vcenter-ballooning.csv