> ## Content Index
> Fetch the complete content index at: https://www.filipkonopik.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# PowerShell: Check if System Uses UEFI or Legacy BIOS
- URL: https://www.filipkonopik.com/powershell-check-if-system-uses-uefi-or-legacy-bios/
- Published: 2026-07-19T04:30:35.000Z
- Updated: 2026-08-06T05:25:31.000Z
- Author: Filip Konopík
- Tags: BIOS & UEFI

Need to know whether a machine boots via UEFI or the older Legacy BIOS mode - for compatibility checks, dual-boot setups, or troubleshooting a boot issue? This one-liner reads it straight from an environment variable.

Prerequisites:

- Privileges: None
- Module: Built-in, no import needed

Quick Command:

```Powershell
$env:firmware_type
```

Example Output:

```Powershell
UEFI
```

📦

****Want all of them at once?**  
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.

[Get the Complete Bundle for $39](https://gum.co/u/oczvkqdc?ref=filipkonopik.com)

How It Works:

- $env:firmware\_type reads a built-in Windows environment variable that Windows itself sets based on how the system booted - it's not a CIM/WMI query, just a direct read of system state.
- The value returned is either UEFI or Legacy (sometimes seen as BIOS), telling you exactly which firmware mode the machine is currently running in.
- This is simpler and faster than digging through Win32\_BIOS, since that CIM class doesn't actually expose this information directly.