Share via

Sucure boot is getting enabled automatically

Pradhyuman Arora 0 Reputation points Microsoft Employee
2026-02-28T14:22:18.8533333+00:00

I have created a VM, now I need to disable secure boot. as soon as I disable and VM starts it gets enabled again. I have tried deleting and recreating the VM.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Marcin Policht 92,380 Reputation points MVP Volunteer Moderator
    2026-02-28T14:31:50.8766667+00:00

    Check the current security type:

    az vm show -g <resource-group> -n <vm-name> --query securityProfile.securityType
    

    If it returns TrustedLaunch, create a new VM with security type set to Standard:

    az vm create \
      -g <resource-group> \
      -n <vm-name> \
      --image <image> \
      --security-type Standard
    

    Security type cannot be changed from TrustedLaunch after creation, so redeployment is required.

    Alternatively, you can simply use a Gen1 image because Gen1 does not support Trusted Launch or Secure Boot.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.