VMware Cloud Community
ayoungdahl
Contributor
Contributor
Jump to solution

powercli find bios or efi boot option

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

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Did you already try

Get-VM |

Select Name,@{N='Firmware';E={$_.ExtensionData.Config.Firmware}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

4 Replies
LucD
Leadership
Leadership
Jump to solution

Did you already try

Get-VM |

Select Name,@{N='Firmware';E={$_.ExtensionData.Config.Firmware}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

ayoungdahl
Contributor
Contributor
Jump to solution

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

0 Kudos
cgutz
Contributor
Contributor
Jump to solution

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.

0 Kudos
rastickland
Enthusiast
Enthusiast
Jump to solution

this worked for me as well

0 Kudos