Solved garlin's PowerShell scripts for updating Secure Boot CA 2023


Functionally it's not any different from creating your own privately-issued PK, and self-signing the pre-signed cert files that MS provides. If you had the same technical expertise and the right signing tools, you could do this yourself.

What Mosby accomplishes is the convenience of have an one-stop self-signing tool that works from a bootable USB. That's handy.

But with any crypto tool, you always have ask if your tools are secure. The source code for Mosby is available on GitHub for everyone to examine, but you might need to be a subject matter expert to fully understand the code. My approach is to use the MS-provided files, which are provided for PC vendors to use if they like. In my script, it's very transparent where we're downloading the keys from, and how it's installed.

Transparency is a big driver on how my scripts are done.

The Windows OEM Devices PK has already been used as an official mitigation for the "DO NOT TRUST - AMI Test" PK flaw. So there's previous precedent.

You can get into endless arguments over which approach is better (self-signed vs OEM delivery). But the Windows OEM Devices certs bundle is pre-packaged so it's known to work if you can get it correctly deployed. It doesn't change, so it's a more predictable outcome when dealing with Q&A. As you can tell, I can spend most of my day working with actual users.

Users can choose which way they want to replace their PK. But my update script will also take care of the Windows side of things (like dealing with a new version of the boot manager or SkuSiPolicy).
Makes perfect sense. :-) Now that I've used both methods, I do find your scripts be quicker and easier to get the job done. With Mosby I guess I counted on the fact that someone that understands the topic far better than I do would be spreading the word if Mosby was compromised. Of course, that could be a fallacy in my thinking! However, it's not like MSC hasn't stumbled with some of their software releases as well... :lmao:
 

My Computers

System One System Two

  • OS
    Win 11 Pro 25H2, Build 26200.8655
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear, Acer 24" 1080p
    Screen Resolution
    5120x1440, 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 NVMe PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    Seagate 4TB Ironwolf, rotating HDD archive files
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • Operating System
    Win 11 Pro 25H2, Build 26200.8524
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
SURPRISE ! SURPRISE !!!

A friends computer on which I never updated any of the certs manually and never force anything
Well MS a applied the SkuSiPolicy on it !!!
The friend has 2 computers, 1 for personal use and 1 for work, which I maintain for him
I never apply any custom tweaking like OOShutUp or service tweaking on firends computers or people that ask for my help
And that friend is in no way capable of doing any of this stuf by himself
For him a computer is something he has to use for email and web access but has no pleasure what so ever doing it :LOL:
So there pretty much clean MS installs...

Well it seems MS does some times apply SkuSiPolicy !!!
And it did on the 4 years old personal computer, not on the 1 year old work one, go figure... :confused:o_O
 

My Computer

System One

  • OS
    Windows 11
Run the check script with -Verbose. You need to see the version numbers.

When the boot manager gets replaced you get a triple whammy:
- new boot manager​
- new SVN​
- new SkuSiPolicy (because they probably replaced winload.efi at the same time)​

If you don't line up a new boot manager and winload.efi (from applying the Monthly Update), then it will fail a security check. On paper, the Secure Boot task is supposed to correctly update, but I don't know if MS has extra paranoia checking that makes it avoid some update actions.

My update script just compares the SecureBootUpdates folder files, and does the right things (when used with the -Revoke option).

I guess mine got out of step after the Tuesday June update. So, I had to apply the Required Actions. I think I am all good again.


Screenshot 2026-06-12 115820.webp

Screenshot 2026-06-12 120334.webp

Screenshot 2026-06-12 121344.webp
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 26200.8655
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Tower Plus EBT2250, DOB: 06/15/2025
    CPU
    Intel® Core™ Ultra 7 265 1.8GHz to 5.3GHz (Arrow Lake)
    Motherboard
    Dell Inc. 02D3NT A00 (U3E1)
    Memory
    SK Hynix 32GB DDR5 5600 Desktop RAM UDIMM Non-ECC PC5-5600B
    Graphics Card(s)
    Dell NVIDIA® GeForce RTX™ 4060 8GB GDDR6 & (iGPU) Integrated Intel® UHD Graphics
    Sound Card
    Chipset Realtek High-Definition Audio with Dolby Atmos
    Monitor(s) Displays
    Dell Ultra Sharp U2515H 25-Inch Screen LED-Lit
    Screen Resolution
    2560 X 1440
    Hard Drives
    Samsung (NVMe PM9C1a 1024GB) M.2 PCIe NVMe Solid State Drive (OS), with Samsung Piccolo (S4LY022) 6-Core 4 Channel Controller.

    Samsung T7 500GB SSD, USB-C External Drive
    PSU
    Dell 460W
    Case
    Dell Tower Plus EBT 2250
    Cooling
    Fan
    Keyboard
    Dell Wired Keyboard - KB216
    Mouse
    Logitech M510
    Internet Speed
    Intel Killer E3100G 2.5 Gigabit Ethernet Controller
    Browser
    Microsoft Edge
    Antivirus
    Microsoft Windows Security
    Other Info
    The Samsung NVMe PM9C1a 1024GB SSD does not use a Phison NAND controller. Instead, it uses Samsung's in-house developed Piccolo (S4LY022) 6-Core 4 Channel Controller. The PM9C1a utilizes a controller built using Samsung's 5-nanometer process and seventh-generation V-NAND technology. 🤔
  • Operating System
    Windows 11 Pro 25H2 26200.8655
    Computer type
    Laptop
    Manufacturer/Model
    Dell Inspiron 15 7000 (7591) 2-in-1, DOB: 11/30/2019
    CPU
    10th Generation Intel Core i7-10510U Processor (8MB Cache, up to 4.9 GHz) Comet Lake
    Motherboard
    Dell 0NNW5N
    Memory
    16GB DDR4 RAM
    Graphics card(s)
    NVIDIA® GeForce® MX250 with 2GB GDDR5 graphics memory
    Sound Card
    Chipset Realtek ALC3254 🤔🤣
    Monitor(s) Displays
    Dell 15.6-inch UHD Truelife Touch Narrow Border WVA Display with Active Pen support
    Screen Resolution
    3840 x 2160
    Hard Drives
    Intel NVME 512GB SSD with 32GB Intel Optane Memory, M.2 80mm PCIe 3.0 RAID

    SanDisk 256GB Extreme microSDXC UHS-I Memory Card
    PSU
    Dell 4-Cell Battery, 68 Whr (Integrated), 90 Watt AC Adapter
    Case
    Dell Inspiron 15 7000 2-in-1 (7591)
    Cooling
    Standard Dell Case Fan & Havit HV-F2056 USB Powered (3 Fans) Laptop Cooling Pad.
    Keyboard
    Dell
    Mouse
    Logitech Wireless Mouse M650L
    Internet Speed
    Wireless/Wired connectivity (WiFi 6 - 802.11 ax)
    Browser
    Microsoft Edge
    Antivirus
    Microsoft Windows Security
    Other Info
    From Dell: 512GB NVME Solid State Drive accelerated by 32GB Intel Optane Memory are the fastest as compared to NAND SSDs. Intel Optane H10 with SSD offers speedy storage and accelerates opening your programs.
So I've successfully updated 3 Dell laptops and one Asus Desktop but I am having an issus with my wifes old Dell desktop.... I think it's a Optiplex 3050.
This PC lets me replace the KEK cert however when I reboot the PC it does get installed. None of the other Dells would allow this, they rejected the cert. If I delete all the keys and reboot I still get the same thing. So there is something about this PC that's wierd. Once it boots it takes 30 mins before the WiFi card connects to the router and gives me internet conectivity. To my knowledge this happened after a MS Update in April. I've run the scannow and DISM utilities and everything comes up roses. I won't be near this PC for another 9 days... Any insight is welecome! We're on a much needed RV trip...LOL

S C:\SecureBoot-CA-2023-Updates.v2026.05.31> ./Check_UEFI-CA2023.ps1 -audit
Secure Boot: OFF (Audit Report runs as ON)
Virtualization Based Security: OFF
BitLocker on (C:) OFF

UEFI KEK Certs
--------------
Microsoft Corporation KEK CA 2011

UEFI DB Certs
-------------
Microsoft Corporation UEFI CA 2011
Microsoft Windows Production PCA 2011
Microsoft Option ROM UEFI CA 2023
Microsoft UEFI CA 2023
Windows UEFI CA 2023

UEFI DBX Certs
--------------
Microsoft Windows PCA 2010

EFI Files
---------
Boot File [Windows UEFI CA 2023] will be UNTRUSTED
Registry: "WindowsUEFICA2023Capable" = 2
[Windows UEFI CA 2023] in UEFI DB, and Windows starting from CA 2023 Boot Manager.


AUDIT REPORT
============
1. Secure Boot is DISABLED
2. [Microsoft Corporation KEK 2K CA 2023] is missing from UEFI KEK
3. [Production PCA 2011] is missing from UEFI DBX
4. Windows BootMgr SVN is missing from UEFI DBX


REQUIRED ACTION
===============

Run the command:
Update_UEFI-CA2023.ps1 -Revoke

Finish the UEFI steps to manually add the [KEK CA 2023] cert, if the script provided instructions.

PS C:\SecureBoot-CA-2023-Updates.v2026.05.31>
 

My Computer

System One

  • OS
    win 11
    Computer type
    Laptop
    Manufacturer/Model
    Dell Precision M4800
    CPU
    Intell Core i7 4900 MQ
    Motherboard
    Dell QT3YTY A00
    Memory
    DDR3 16 GB
On my HP Z440, i deleted the secure cert keys in the bios and ran the update script. That did not get me anywhere. I then reset the factory default certs in the bios, and ran Update_UEFI.bat -revoke. That worked and this time I got the dbx updates that gave me problems before: so, it confirmed your assumption Garlin that the dbx was corrupt as the computer became a lot faster, after switching it on to the point where it started to load windows 11.
The update script did tell me to manually add certs in the bios, and then reboot, buit I found no possibility to do so. So, I rebooted without manually adding anything.

However, since then, I have secure boot enabled in the bios, but when windows 11 is started, it finds no secure boot. When I look at the check_uefi.bat -verbose, I get this:

.\check-UEFI.bat -Verbose
PowerShell 7.6.2
Windows 11 25H2 (26200.8655)

Secure Boot: OFF
Virtualization Based Security: ON
BitLocker on (C:) OFF

BIOS Firmware
-------------
Hewlett-Packard HP Z440 Workstation
Version: M60 v02.62
Date: 2024-01-04

Factory Default UEFI PK Cert
----------------------------
Hewlett-Packard UEFI Secure Boot Platform Key

UEFI PK Cert
------------
(NONE)

Factory Default UEFI KEK Certs
------------------------------
Microsoft Corporation KEK CA 2011
Hewlett-Packard UEFI Secure Boot Key Exchange Key

UEFI KEK Certs
--------------
Microsoft Corporation KEK CA 2011
Microsoft Corporation KEK 2K CA 2023

Factory Default UEFI DB Certs
-----------------------------
Microsoft Corporation UEFI CA 2011
Microsoft Windows Production PCA 2011
Hewlett-Packard UEFI Secure Boot DB Key

UEFI DB Certs
-------------
Microsoft Corporation UEFI CA 2011
Microsoft Windows Production PCA 2011
Microsoft Option ROM UEFI CA 2023
Microsoft UEFI CA 2023
Windows UEFI CA 2023

Factory Default UEFI DBX Certs
------------------------------
(NONE)
EFI_CERT_SHA256_GUID Signatures: 14

UEFI DBX Certs
--------------
Microsoft Windows Production PCA 2011
Windows BootMgr SVN 9.0
EFI_CERT_SHA256_GUID Signatures: 447

UEFI Variables
--------------
Credential Guard: ON
SBAT (Linux only): sbat,1,2024010900 / shim,4 / grub,3 / grub.debian,4

EFI Files
---------
Windows Boot Manager [Windows UEFI CA 2023] is ALLOWED.
\\.\HarddiskVolume1\EFI\Microsoft\Boot\bootmgfw.efi
File Version: 28000.342, SVN 9.0

Registry: "WindowsUEFICA2023Capable" = 2
[Windows UEFI CA 2023] in UEFI DB, and Windows starting from CA 2023 Boot Manager.

SkuSiPolicy.p7b is CURRENT.
\\.\HarddiskVolume1\EFI\Microsoft\Boot\SkuSiPolicy.p7b
Version: 3.0.0.15


STATUS REPORT
-------------
Registry: "UEFICA2023Status" = Updated

SUCCESS: UPDATES ARE FINISHED.
UEFI CA 2023 certs are present, PCA 2011 cert is revoked.

PS C:\Users\admin\Downloads\SecureBoot-CA-2023-Updates.v2026.06.08> .\Check-DBX.bat -Verbose
PowerShell 7.6.2
SUCCESS: Matched 289/289 EFI signatures from "dbxupdate.bin"
SUCCESS: Matched 3/3 SVN signatures from "DBXUpdate2024.bin"
SUCCESS: Matched 3/3 SVN signatures from "DBXUpdateSVN.bin"

I assume the problem is the UEFI PK cert being empty. It was populated before. How can I populate this again, or can I do something else?
I have now found out that if I want to get full bios admin access, I will need to open up my HP Z440, and re-add the jumper om the mainboard (which I took out to easily access the bios.). Do you think this may become necessary?
 

My Computer

System One

  • OS
    windows 11
So I've successfully updated 3 Dell laptops and one Asus Desktop but I am having an issus with my wifes old Dell desktop.... I think it's a Optiplex 3050.
This PC lets me replace the KEK cert however when I reboot the PC it does get installed. None of the other Dells would allow this, they rejected the cert. If I delete all the keys and reboot I still get the same thing. So there is something about this PC that's wierd. Once it boots it takes 30 mins before the WiFi card connects to the router and gives me internet conectivity. To my knowledge this happened after a MS Update in April. I've run the scannow and DISM utilities and everything comes up roses. I won't be near this PC for another 9 days... Any insight is welecome! We're on a much needed RV trip...LOL

S C:\SecureBoot-CA-2023-Updates.v2026.05.31> ./Check_UEFI-CA2023.ps1 -audit
Secure Boot: OFF (Audit Report runs as ON)
Virtualization Based Security: OFF
BitLocker on (C:) OFF

UEFI KEK Certs
--------------
Microsoft Corporation KEK CA 2011

UEFI DB Certs
-------------
Microsoft Corporation UEFI CA 2011
Microsoft Windows Production PCA 2011
Microsoft Option ROM UEFI CA 2023
Microsoft UEFI CA 2023
Windows UEFI CA 2023

UEFI DBX Certs
--------------
Microsoft Windows PCA 2010

EFI Files
---------
Boot File [Windows UEFI CA 2023] will be UNTRUSTED
Registry: "WindowsUEFICA2023Capable" = 2
[Windows UEFI CA 2023] in UEFI DB, and Windows starting from CA 2023 Boot Manager.


AUDIT REPORT
============
1. Secure Boot is DISABLED
2. [Microsoft Corporation KEK 2K CA 2023] is missing from UEFI KEK
3. [Production PCA 2011] is missing from UEFI DBX
4. Windows BootMgr SVN is missing from UEFI DBX


REQUIRED ACTION
===============

Run the command:
Update_UEFI-CA2023.ps1 -Revoke

Finish the UEFI steps to manually add the [KEK CA 2023] cert, if the script provided instructions.

PS C:\SecureBoot-CA-2023-Updates.v2026.05.31>
Also I can enable or disable Secure boot at will.
 

My Computer

System One

  • OS
    win 11
    Computer type
    Laptop
    Manufacturer/Model
    Dell Precision M4800
    CPU
    Intell Core i7 4900 MQ
    Motherboard
    Dell QT3YTY A00
    Memory
    DDR3 16 GB

Latest Support Threads

Back
Top Bottom