PowerCli enable Secure Boot

Welcome Forums General PowerShell Q&A PowerCli enable Secure Boot

This topic contains 3 replies, has 2 voices, and was last updated by

 
Participant
1 week, 3 days ago.

  • Author
    Posts
  • #113822

    Participant
    Points: 0
    Rank: Member

    Hi All

    I'm creating a script and am stuck at finding the correct solution for enabling Secure Boot (basically so the box is ticked post command)

    I've managed to set the Firmware to EFI but can't enable the Secure Boot (EFI Boot Only)

    I've tried the below to no avail:

     

    $spec = New-Object VMware.Vim.VirtualMachineConfigSpec

    $bootOptions = New-Object Vmware.Vim.VirtualMachineBootOptions

    $bootOptions.vm.ExtensionData.Config.EfiSecureBootEnabled = $true

    $spec.BootOptions = $bootOptions

     

    Version: VMware vSphere PowerCLI 6.0 Release 2 build 3056836

     

    Any help would be much appreciated

    Thank you

     

  • #113857

    Participant
    Points: 65
    Published
    Rank: Member
    • #113908

      Participant
      Points: 0
      Rank: Member

      Hi – this doesn't explain how to configure in PowerCLI format, it only sets the Firmware to EFI

  • #113911

    Participant
    Points: 65
    Published
    Rank: Member

    My search hit this result which is an example in VMWare GitHub repo.
    https://github.com/vmware/PowerCLI-Example-Scripts/blob/master/Scripts/SecureBoot.ps1

You must be logged in to reply to this topic.