Find VMs with Video Card Memory higher than 30MB

Connect-VIServer -server VCENTER -User USER -Password PASSWORD

$vms = Get-VM
foreach ($vm in $vms) {
	$vmview = $vm | Get-View 
	foreach ($device in $vmview.config.hardware.device)
	{
		if ($device.Key -eq 500){
			$test = $device.DeviceInfo.Summary
			$result = $device.videoRamSizeInKB
			if ($result -cgt 30000){
				$mb = $result/1024
				Write-Host $vm $result $mb
			}
		}
	}
}
Write-Host "Done"

1 thought on “Find VMs with Video Card Memory higher than 30MB

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.