PowerCLI

 View Only
  • 1.  powercli find bios or efi boot option

    Posted Jul 01, 2016 06:19 PM

    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



  • 2.  RE: powercli find bios or efi boot option
    Best Answer

    Posted Jul 02, 2016 10:06 AM

    Did you already try

    Get-VM |

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



  • 3.  RE: powercli find bios or efi boot option

    Posted Jul 05, 2016 08:54 PM

    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



  • 4.  RE: powercli find bios or efi boot option

    Posted Sep 29, 2017 06:17 PM

    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.



  • 5.  RE: powercli find bios or efi boot option

    Posted Jul 24, 2020 06:39 PM

    this worked for me as well