This is what I used:
Install-Module -Name UEFIv2
Import-Module -Name UEFIv2
(Get-UEFISecureBootCerts db).signature
--
John Wright
IT Support Specialist
![]()
1800 Old Bluegrass Avenue, Louisville, KY 40215
Please submit IT requests to Hazelwoo...@bluegrass.org
24 Hour Helpline 1.800.928.8000
CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com>
On Behalf Of Mike Leone
Sent: Thursday, May 14, 2026 2:40 PM
To: NTPowershell Mailing List <ntpowe...@googlegroups.com>
Subject: [ntpowershell] Checking for updated TPM Secure Boot Certificates
|
EXTERNAL EMAIL - This email was sent by a person from outside your organization. Exercise caution when clicking links, opening attachments or taking further action, before validating its authenticity. |
|
Secured by Check Point |
--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntpowershell...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BhAVotJnVTqzENV48GYX1TDXWwEmq59VwUSfi9uiS8YTA%40mail.gmail.com.
This is what I used:
Install-Module -Name UEFIv2
Import-Module -Name UEFIv2
(Get-UEFISecureBootCerts db).signature
I didn’t do it remotely. I’m not sure why it would make a difference. Can’t you connect with Remote Management?
The module is in Powershell Gallery.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BhKeO6Uv_88m25fpD3kHBRTXTfhm85SKJ7vkO7OHcQ3Hw%40mail.gmail.com.
I didn’t do it remotely. I’m not sure why it would make a difference. Can’t you connect with Remote Management?
The module is in Powershell Gallery.
For the remote query of numerous machines, you can wrap it like this:
Foreach ($c in $computers)
{
Invoke-command -computername $c -scriptblock { foo }
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BgCuEPKGa9XYF-WR8u-tNdZjTX_jZbK-j0gMiJPZgVeRQ%40mail.gmail.com.
Well, and you’ll have to add some lines to pull down the module and install it, etc., of course.
--
John Wright
IT Support Specialist
![]()
1800 Old Bluegrass Avenue, Louisville, KY 40215
Please submit IT requests to Hazelwoo...@bluegrass.org
24 Hour Helpline 1.800.928.8000
CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
For the remote query of numerous machines, you can wrap it like this:
Foreach ($c in $computers)
{
Invoke-command -computername $c -scriptblock { foo }
}
Well, and you’ll have to add some lines to pull down the module and install it, etc., of course.
Sorry, I missed that because it was further down. But I see the problem.
$Check_for_TMP_certificates is to to $FALSE. Therefore if Confirm_SecureBootUEFI returns true, your comparison (=) amounts to this.
$FALSE = $TRUE
Which is false. That’s the reason for the discrepancy.
$Check_for_TPM_certificates = $FALSE
IF (Test-Connection -ComputerName $MemberServer -Count 1 -Quiet) {
Invoke-Command -ComputerName $MemberServer -ScriptBlock {
$Check_for_TPM_certificates = Confirm-SecureBootUEFI
--
John Wright
IT Support Specialist
![]()
1800 Old Bluegrass Avenue, Louisville, KY 40215
Please submit IT requests to Hazelwoo...@bluegrass.org
24 Hour Helpline 1.800.928.8000
CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com>
On Behalf Of Mike Leone
Sent: Thursday, May 14, 2026 4:26 PM
To: ntpowe...@googlegroups.com
Subject: Re: [ntpowershell] Checking for updated TPM Secure Boot Certificates
|
EXTERNAL EMAIL - This email was sent by a person from outside your organization. Exercise caution when clicking links, opening attachments or taking further action, before validating its authenticity. |
|
Secured by Check Point |
--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntpowershell...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BhNnoa7zG-XrUS6ANn%3DGHcqWKZEBvxifftV0fFi0xR9Dw%40mail.gmail.com.
Doh! Too early and not enough coffee. It’s not a comparison. That would be -eq.
Okay, fine. Let me try running this and see what I get.
--
John Wright
IT Support Specialist
![]()
1800 Old Bluegrass Avenue, Louisville, KY 40215
Please submit IT requests to Hazelwoo...@bluegrass.org
24 Hour Helpline 1.800.928.8000
CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
All right. Try this. It sets the value of the variable by setting it by the output of invoke-command rather than trying to set it within the script block.
For me, this returns True. 😊
$script:Check_for_TPM_certificates = $FALSE
IF (Test-Connection -ComputerName $Computer -Count 1 -Quiet) { $script:Check_for_TPM_certificates = Invoke-Command -ComputerName $Computer -ScriptBlock { Confirm-SecureBootUEFI }}
$Check_for_TPM_certificates
All right. Try this. It sets the value of the variable by setting it by the output of invoke-command rather than trying to set it within the script block.
For me, this returns True. 😊
$script:Check_for_TPM_certificates = $FALSE
IF (Test-Connection -ComputerName $Computer -Count 1 -Quiet) { $script:Check_for_TPM_certificates = Invoke-Command -ComputerName $Computer -ScriptBlock { Confirm-SecureBootUEFI }}
$Check_for_TPM_certificates
In a PowerShell session enter “help about_scopes”. There are several.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BgzcyiynMZZFkhoQajpPzNR_H74bULVNK%3D%3D3TVkpe_kHw%40mail.gmail.com.