Does anyone know of a powercli script to find all VMs with the 3D graphics setting enabled?
The following PowerCLI script will give you a list of all your VM's and templates and shows if 3D support is enabled or disabled:
Get-View -ViewType VirtualMachine -Property Name,Config.Hardware.Device | ` ForEach-Object { $VM = $_ $VM.Config.Hardware.Device | ` Where-Object {$_.GetType().Name -eq "VirtualMachineVideoCard"} | ` Select-Object -property @{N="VM";E={$VM.Name}},Enable3DSupport }
If you want to see only the VM's and templates with 3D support enabled you can filter the output:
Get-View -ViewType VirtualMachine -Property Name,Config.Hardware.Device | ` ForEach-Object { $VM = $_ $VM.Config.Hardware.Device | ` Where-Object {$_.GetType().Name -eq "VirtualMachineVideoCard"} | ` Select-Object -property @{N="VM";E={$VM.Name}},Enable3DSupport } | Where-Object {$_.Enable3DSupport}
If you want only VM's and no templates you need to change the first line into:
Get-View -ViewType VirtualMachine -Filter @{"Config.Template"="False"} -Property Name,Config.Hardware.Device | `
Regards, Robert
Thanks! Is there anyway to mass uncheck that box without power downs via powercli?
We noticed several VM's across out environment have the Enable3DSupport flag enabled. Has anyone been able to disable this via powercli?
We use a nice LucD script for changing the Video Memory to autodetect, so hoping it's possible.
thanks.
You ROCK!
Thanks for the help.
In this context, I'm looking for a script that enables 3D support on the VM, without editing the vmx file. That would be very great.