Trying to get a list of all my VMs and whether they boot BIOS or EFI using PowerCLI 5.5 release 1. Doesn't seem to be in ExtensionData.Config.BootOptions like I'd expect and I'm having an awful time trying to track down where it might be. Must be somewhere, right? I'd be thrilled if anyone can point me to where this attribute is kept.
Thanks for any suggestions
Did you already try
Get-VM |
Select Name,@{N='Firmware';E={$_.ExtensionData.Config.Firmware}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Did you already try
Get-VM |
Select Name,@{N='Firmware';E={$_.ExtensionData.Config.Firmware}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thought I had tried ExtensionData.Config.Firmware, but I must not have because it clearly returns what I was looking for.
Thanks for the pointer LucD
I created a script to set the EFI Bios, which was similar to William Lam's github post on SecureBoot - PowerCLI-Example-Scripts/SecureBoot.ps1 at master · vmware/PowerCLI-Example-Scripts · GitHub
$spec = new-object VMware.Vim.VirtualMachineConfigSpec
$spec.Firmware = New-Object VMware.Vim.GuestOsDescriptor
$spec.Firmware = "efi"
$task = $vm.ExtensionData.ReconfigVM_Task($spec)
Hope this helps other people that were looking for something similar, but actually sets the BIOS type.
this worked for me as well