---
updatedAt: 2026-05-13T09:35:32.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-central/llms.txt
---

# Secure Boot Status - Powershell

```powershell PowerShell
try {
    $secureBootStatus = (Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\SecureBoot\State" -Name "UEFISecureBootEnabled" -ErrorAction Stop).UEFISecureBootEnabled
    
    if ($secureBootStatus -eq 1) {
        Write-Output "Secure Boot: Enabled"
        exit 0
    } else {
        Write-Output "Secure Boot: Disabled"
        exit 1
    }
}
catch {
    Write-Output "Secure Boot: Unknown (Registry key not found)"
    exit 2
}
```

```json Response Example
{"success":true}
```

# Download PowerShell script

<!-- powershell@ -->

Download the PowerShell script.

# Run it locally or add it to your RMM

<!-- powershell@ -->

You can run this script locally or add it to RMM script repository to run it against managed devices.