Wednesday, October 21, 2026
HomePowershellTest Safe Boot Certificates of all Area-Computer systems with PowerShell – SID-500.COM

Test Safe Boot Certificates of all Area-Computer systems with PowerShell – SID-500.COM


PowerShell

The Microsoft Safe Boot certificates expires in 2026. Here’s a PowerShell script that retrieves the Safe Boot boot certificates info from all area computer systems and checks whether or not they comprise the CA 2023 certificates, and never older certificates.

Let’s dive in.

Run the next code on a website controller to retrieve details about the at the moment put in Safe Boot certificates in your distant computer systems. All techniques ought to report the CA 2023 certificates.

# Retrieve all computer systems in Energetic Listing and test for the presence of the "UEFI CA 2023" certificates
# Prerequisite: Neccesary permissions to entry distant computer systems and PS Remoting enabled on track machines (by way of GPO or Allow-PSRemoting)
$cred = Get-Credential -Message "Enter credentials with entry to distant computer systems"
Get-ADComputer -Filter * | ForEach-Object {
    $computerName = $_.Identify
    $secureBootInfo = Invoke-Command -ComputerName $computerName -Credential $cred -ScriptBlock {
        [System.Text.Encoding]::ASCII.GetString(
        (Get-SecureBootUEFI -Identify db).Bytes
        ) -match "UEFI CA 2023" # sollte 2023 sein
    }
    if ($secureBootInfo -eq $true) {
        [PSCustomObject]@{
            ComputerName = $computerName
            CertficateStatus = "UEFI CA 2023 discovered"
        }
    } else {
        [PSCustomObject]@{
            ComputerName = $computerName
            CertficateStatus = "UEFI CA 2023 NOT !!! discovered"
        }
    }
} | Format-Desk -AutoSize

See you subsequent time with PowerShell.

Unknown's avatar

Revealed by Patrick Gruenauer

Microsoft MVP on PowerShell & Microsoft 365, IT-Coach, IT-Guide, MCSE: Cloud Platform and Infrastructure, Cisco Licensed Academy Teacher.

Previous articleCSS { In Actual Life }
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments