I recently created 3 version of a FixSecureBoot script — a lightweight alternative inspired by the excellent work of haz-ard-9, the author of FixSecureBootBulk.ps1. Their script is powerful and absolutely the right choice if you rely on BitLocker or need a fully automated, safety‑first workflow.
However, at roughly 3,000 lines of code, the original script is understandably complex. It includes many checks and safeguards, which are great for production environments but made it harder for me to fully understand what was happening under the hood. I wanted something simpler, easier to read, and tailored to my own workflow.
So I took the time to study the original script, copied only the parts I needed, and built a much more compact version that gives me exactly the result I want — which show the verification step that every thing is correct updated.
What My Script Does
Here’s the full sequence of actions my simplified script performs:
I’ve tested this workflow successfully on:
Downloads
** link the links for downloading the original files from Microsoft Github page.
WindowsOEMDevicesPK.der
microsoft corporation kek 2k ca 2023.der
Rename microsoft corporation kek 2k ca 2023.der to kek2023.der
Current Limitation: Packer Integration
CLEAN PACKER BUILD IS NOT SAFE!! AFTER THE BUILD YOU NEED TO RUN FIX SECURE BOOT!!
I don’t yet have a complete fix for integrating this into a full Packer build. For now, I simply pre‑stage the certificates:
Build file:
provisioner “file” {
source = “./setup/SecurebootCert/”
destination = “C:/Windows/Temp”
}
I have build three versions:
Fix_Secure_Boot_Manual.ps1
Fix_Secure_Boot_Single.ps1
Fix_Secure_Boot_Multi.ps1
If you want a script that’s easier to read, easier to modify, and still gets the job done (as long as you’re not using BitLocker), this simplified version might be exactly what you need.
Let me know if you want me to share the script itself or write a follow‑up post about how it works internally.
Template Check if al ready Updated

If VM check if al ready updated

Run Script full from Template

You must be logged in to post a comment.