Getting error when attempting to execute the command to check the Secure Boot certificate


johnpd

Well-known member
Member
VIP
Local time
9:15 PM
Posts
117
Location
Green Valley, AZ
OS
Windows 10
I attempted to check the state of the secure boot certificate on a system I work on using the PS command "[System.Text.Encoding]::ASCII.GetString((Get-SecureBootUEFI db).bytes) -match ’Windows UEFI CA 2023’". However on this system I received an error indicating that "Get-SecureBootUEFI variable is currently undefined". This makes no sense. I have two identical systems which have had the certificate updated with the April 2nd Tuesday updates. I am wondering if there is an underlying issue with the system and that it might be a good idea to do a repair installation on it. Any thoughts?

JohnD
 

My Computer My Computer

At a glance

Windows 10
OS
Windows 10
Run this in Powershell under Admin: Confirm-SecureBootUEFI


The status is also available by running msinfo32 in CMD

Your command didn't return anything on either of my windows 11 computers with the lastest releases applied
 
Last edited:

My Computer My Computer

At a glance

Windows 11 & Zorin ProIntel® Core™ Ultra 9 Processor 275HX 2.7 GHz32 gbNVIDIA® GeForce RTX™ 5060 Laptop GPU
OS
Windows 11 & Zorin Pro
Computer type
Laptop
Manufacturer/Model
Asus Rog Strix G16
CPU
Intel® Core™ Ultra 9 Processor 275HX 2.7 GHz
Motherboard
AsusteK Computer
Memory
32 gb
Graphics Card(s)
NVIDIA® GeForce RTX™ 5060 Laptop GPU
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Laptop 16 inch
Screen Resolution
2560 X 1600
Hard Drives
Boot: Samsung 9100 NVME 2 TB Microsoft Storage Controller: Standard NVM Express Driver: Microsoft 6/21/2006. No SATA/AHCI on my motherboard or in bios
Mouse
Pad
Browser
Google Chrome
Antivirus
Microsoft
Other Info
Printer: HP Color LaserJet MFP M477dw
I attempted to check the state of the secure boot certificate on a system I work on using the PS command "[System.Text.Encoding]::ASCII.GetString((Get-SecureBootUEFI db).bytes) -match ’Windows UEFI CA 2023’". However on this system I received an error indicating that "Get-SecureBootUEFI variable is currently undefined". This makes no sense. I have two identical systems which have had the certificate updated with the April 2nd Tuesday updates. I am wondering if there is an underlying issue with the system and that it might be a good idea to do a repair installation on it. Any thoughts?
A repair install won't fix the problem, your UEFI variables may be corrupted. The best thing to do is reset to factory defaults, and allow Windows to try again.

1. Enter the BIOS menu, disable Secure Boot mode if it was enabled.
2. Select the UEFI option to reset to factory keys (just the UEFI menu, not reset the whole BIOS).
3. Restart Windows.
4. Wait a day, for the Secure Boot update task to detect you don't have the KEK CA 2023 certificate and re-install it again.
5. Once you see the message that it reinstalled KEK, re-enable Secure Boot.

Occasionally writing to the UEFI variables can be glitchy with some BIOS'es. You didn't state your PC's model.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
OK I found that two systems had Secure Boot turned off. Don’t know why. I turned it on on both computers. The newer one had the upgraded certificate and it now displays the status as updated. The other one does not have the updated certificate yet. I will check for a few days to see if it gets picked up.

Thanks for your help.
JohnD
 

My Computer My Computer

At a glance

Windows 10
OS
Windows 10
Some BIOS'es can be weird in that you can't read the Secure Boot certs when it's disabled. Other PC's don't care, and will always allow you to read them. It's probably a vendor thing on older PC's.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
My Lenovo laptop has everything installed, but still showing old as using the old certificate. I know it is there, but not being picked up in Device Security. What can I run. I have rebooted several times. Here is the information:

Data from the Check-UEFI.bat:
Secure Boot: ON
Virtualization Based Security: OFF
BitLocker on (C:) OFF

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

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

UEFI DBX Certs
--------------
(NONE)

EFI Files
---------
Disk 0: Windows Boot Manager [Windows UEFI CA 2023] is ALLOWED.

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

Reg Info
----------

Secure_Boot_Reg_Settings.webp
 

My Computer My Computer

At a glance

Windows 10
OS
Windows 10
You have most of the CA 2023 certs, except for the Option ROM (which by its name, is optional and may be needed for certain graphics cards if they have signed firmware).

If you run "Update-UEFI.bat", it will copy the Option ROM for you. This should get you a green check mark in Windows Security Center after rebooting.

Make sure you have the latest versions of the scripts from the ZIP file in post #1 of this thread:

Windows Security Center requires a restart to have any Secure Boot changes be reflected in the score.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Back
Top Bottom