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


Something is wrong. Now what?

I'm lost with words on why you still have the one that looks like a MStore version

But this one seems correct
1785515035807.webp

Can you run these commands again to validate you are pointing at the winget version
Code:
$PSHOME
(Get-Process -Id $PID).Path
Get-Command pwsh | Select-Object Source
where.exe pwsh

They should all point to "C:\Program Files\PowerShell\7" and last 3 should point to "pwsh.exe"
If they do, you can try Garlin's command again hoping it now works as expected.

These two commands get the same result:
Code:
.\Check-UEFI.bat -Verbose -BootMedia
.\Check_UEFI-CA2023.ps1 -Verbose -BootMedia
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
My Dell Optiplex 9020 MT status.

As I understand things with my sandbox system not having an updated KEK CA 2023 certificate, it is possible to manually append a certificate that is at CA 2023. And, a CA 2023 KEK certificate as provided by MSFT can be found in the EFI partition. However, using the Dell Type 2 BIOS firmware requires an input format other than .der, .cer or .crt. One reference found says Dell expects .auth format.

I have found one reference which says it is possible to convert from .der to .auth but I am unclear about doing that. Between my lack of experience in doing such things and the lack of an explicit and detailed documentation for doing such a conversion, I think I'm at an impasse.

Another reference found along with a document from the DOD says it is possible to create your own self-signed certificates (all 4) and to use those to bring the Secure Boot enviroment up to CA 2023. But again this is beyond my experience level.

I guess in the meantime, the 9020 which has "one foot in the boat and the other foot on the dock", will be OK until October when the CA 2011 KEK certificate expires resulting in no more updates to db or dbx with the associated security risks.

Maybe I'll get lucky some how in the next few months and be able to salvage the use of these very solid systems as far as having a total and complete Secure Boot environment. But if I don't get lucky I guess the choices are: (1) remove them from use and recycle the electronics; (2) stop worrying about Secure Boot, disable it and continue to use my NAS/file servers without it.

Fire away!
 

My Computers My Computers

  • At a glance

    Windows 11 Pro; Windows Server 2016 EssentialsNUC8I7BEH16 GBIntel Iris
    OS
    Windows 11 Pro; Windows Server 2016 Essentials
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel
    CPU
    NUC8I7BEH
    Motherboard
    Intel NUC8BEB
    Memory
    16 GB
    Graphics Card(s)
    Intel Iris
    Sound Card
    Intel Cannon Lake-LP - cAVS (Audio, Voice, Speech)
    Monitor(s) Displays
    ASUS PB328
    Screen Resolution
    1920 x 1200
    Hard Drives
    Kingston SSD
  • At a glance

    Windows Server 2016 EssentialsIntel Xeon E-2246G16 GBMatrox MGA-G200eW3
    Operating System
    Windows Server 2016 Essentials
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell
    CPU
    Intel Xeon E-2246G
    Motherboard
    DELL 0DK9CR (Poweredge T340)
    Memory
    16 GB
    Graphics card(s)
    Matrox MGA-G200eW3
  • Intel NUCs (NUC10I5, NUC13I7, NUC13I3); Dell 9020 MT
I'm lost with words on why you still have the one that looks like a MStore version

But this one seems correct
View attachment 178091

Can you run these commands again to validate you are pointing at the winget version
Code:
$PSHOME
(Get-Process -Id $PID).Path
Get-Command pwsh | Select-Object Source
where.exe pwsh

They should all point to "C:\Program Files\PowerShell\7" and last 3 should point to "pwsh.exe"
If they do, you can try Garlin's command again hoping it now works as expected.
Still not right.

New1.webp

There is no folder named C:\Program Files\PowerShell on my system.

Time for a nap. :sleep:
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2i7-8565U16GBIntel UHD Graphics 620
    OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo T490 (2020 Hardware)
    CPU
    i7-8565U
    Motherboard
    20N20028US
    Memory
    16GB
    Graphics Card(s)
    Intel UHD Graphics 620
    Sound Card
    Realtec Audio
    Monitor(s) Displays
    ASUS VE248
    Screen Resolution
    1920 X 1080
    Hard Drives
    Samsung SSD 970 PRO 512GB NVMe
    Internet Speed
    Frontier fiber 1GB
    Browser
    Chrome, Firefox, Edge
    Antivirus
    Norton 360 Deluxe Plus
    Other Info
    Supported hardware, upgraded from Windows 10 Pro to Windows 11 Pro version 24H2 on 06/01/2025 using the Windows 11 ISO file. Used the enablement package to upgrade to version 25H2 on 10/07/2025. Secure boot enabled. Secure Boot CA 2023 updated.
  • At a glance

    Windows 11 Pro 25H2i7-4770 (with SSE4.2, and POPCNT)16GBIntel HD Graphics 4600
    Operating System
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo ThinkCentre M83 (2014 Hardware)
    CPU
    i7-4770 (with SSE4.2, and POPCNT)
    Motherboard
    10AL000GUS
    Memory
    16GB
    Graphics card(s)
    Intel HD Graphics 4600
    Sound Card
    Realtec High Definition Audio
    Monitor(s) Displays
    ASUS VE248
    Screen Resolution
    1920 X 1080
    Hard Drives
    Samsung SSD 860 PRO 1TB SATA
    Internet Speed
    Frontier fiber 1GB
    Browser
    Chrome, Firefox, Edge
    Antivirus
    Norton 360 Deluxe Plus
    Other Info
    Unsupported hardware, upgraded from Windows 10 Pro (TPM 1.2 & unsupported CPU, but does have SSE4.2, and POPCNT) to Windows 11 Pro version 24H2 on 06/15/2025. Added Registry Key HKEY_LOCAL_MACHINE\SYSTEM\Setup\MoSetup – AllowUpgradesWithUnsupportedTPMOrCPU=1 to allow installation using the Windows 11 ISO file. Used the enablement package to upgrade to version 25H2 on 10/08/2025. Secure boot enabled. Secure Boot CA 2023 updated.
Still not right.

View attachment 178105

There is no folder named C:\Program Files\PowerShell on my system.

Time for a nap. :sleep:
You ran the commands in the MStore one, try them in the other window, this one

1785519304040.webp

But have you tried Garlin's commands again ? in either one ?

EDIT:
I think I found why your not finding the new one you installed with winget.
On my systems, I uninstalled all Powershell versions except the one from winget.
So when I search for PowerShell, that's the only one it finds.
Instead of searching for "
PowerShell" in the Start Menu, search for "pwsh", it should show you the one you installed with winget.
You should now see this one, right click and start as administrator and test Garlin's commands.


1785526004233.webp
 
Last edited:

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
As I understand things with my sandbox system not having an updated KEK CA 2023 certificate, it is possible to manually append a certificate that is at CA 2023. And, a CA 2023 KEK certificate as provided by MSFT can be found in the EFI partition. However, using the Dell Type 2 BIOS firmware requires an input format other than .der, .cer or .crt. One reference found says Dell expects .auth format.

I have found one reference which says it is possible to convert from .der to .auth but I am unclear about doing that. Between my lack of experience in doing such things and the lack of an explicit and detailed documentation for doing such a conversion, I think I'm at an impasse.
Some older Dell BIOS'es can only accept the .auth file format. The .auth format is basically an export of the Secure Boot variable's raw bytes.

A Secure Boot certificate can be presented in one of two formats: pre-signed and post-signed. For the KEK, that means it needs to be signed by the current PK (which is the Dell factory PK by default).

A pre-signed cert is any cert which hasn't been signed by the PK. If you are the PK's owner (Dell, or you created your own private PK), then you own the PK's secret key that can be used to sign this cert file, transforming it into a post-signed file. But if you're not Dell, you don't have their private key.

The .auth format assumes the cert object has already been post-signed. As Dell won't support your PC, they will not provide a post-signed KEK file. Therefore this option is closed to us, and the next option is to Delete All Keys. This removes the PK as the blocking factor, and allows us to install a replacement set of Secure Boot keys.

Fortunately, MS provides a reference set of keys ("Windows OEM Device") which can be used.

If you have "Delete All Keys" presented, choose that option. Restart Windows, and run the update script. Before you delete all keys confirm you have disabled BitLocker (if enabled) on the C: drive and Windows Hello PIN (otherwise you may be locked out because it detects security changes).

Another reference found along with a document from the DOD says it is possible to create your own self-signed certificates (all 4) and to use those to bring the Secure Boot enviroment up to CA 2023. But again this is beyond my experience level.
Every user has the option to perform self-signing, but it's too much hassle for normal users if you're only updating the CA 2023 certs this one time.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Every user has the option to perform self-signing, but it's too much hassle for normal users if you're only updating the CA 2023 certs this one time.
Wouldn't one benefit of self-signing assure you that the key was actually not compromised like the 2022 debacle?

 

My Computers My Computers

  • At a glance

    Win 11 Pro 25H2, Build 26200.8973Intel Core i5 1450064GB DDR4GeForce RTX 4060
    OS
    Win 11 Pro 25H2, Build 26200.8973
    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
  • At a glance

    Win 11 Pro 25H2, Build 26200.8894Intel Core i5 1440032GB DDR5Intel 700 Embedded GPU
    Operating System
    Win 11 Pro 25H2, Build 26200.8894
    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
  • Nimo N171 17" Laptop, (Intel i3-1215U, 16GB RAM, 2TB NVMe, Win11 Pro)
    Acemagic Vista Mini PC V1 (Intel N150, 16GB RAM, 1TB NVMe, Win11 Pro)
    HP ENVY h8-1540t, (24GB RAM, 2TB SSD, 2TB HDD, Win11 Pro)
You're free to use self-signed certs, and the really paranoid or technical folks do that. But you're on your own (DIY) or that app I'm not allowed to mention, or have to seek a different community (usually Linux) to support your questions.

PKFail was well known in security circles before it was named "PKFail". What Binary did was to shock the industry by trying to actively count how broad the problem was. MS already addressed this with the "Windows OEM Devices" fix here:

CERTCC/PKfail Mitigations & detection tools for VU#455367

My scripts will nag you if you have a "DO NOT [whatever]" or "Test" PK. This is more an issue of lazy engineering from some OEM's. The BIOS licensors clearly instructed everyone to create their own PK's, and not copy the reference design they gave out.

The point being if everyone used the exact same PK, then breaking the PK's encryption key means you have access to so many different vendor's PC's, instead of spending much more effort to hack each individual company's PK. For a large company like Dell, they have a lot of different PK's floating around (although some models were caught with the PKFail laziness).

Could the Windows OEM Devices PK be cracked too, and that's a new form of PKFail? True.

But short of getting into a key management mess, it's the lesser evil for non-technical users. It's the 80/20 rule. You can recommend others take a more technical route up the mountain, but are you going to help them when they get stuck halfway to the summit?
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7

Latest Support Threads

Back
Top Bottom