Retrieve Oem bios Windows License key (uefi)

Share this post:

** updated 9/8/2026 to reflect deprecation of wmic and vbs **

Did a clean install on a device & Windows did not pick up the bios activation key? no 3rd party tools required, these commands will retrieve the key for you

Run this in PowerShell (Elevated) to retrieve the key

(Get-CimInstance -ClassName SoftwareLicensingService -ErrorAction SilentlyContinue | Select-Object -ExpandProperty OA3xOriginalProductKey -ErrorAction SilentlyContinue)

Retrieve & install: (run in elevated PowerShell)

$ProductKey = (Get-CimInstance -ClassName SoftwareLicensingService -ErrorAction SilentlyContinue | Select-Object -ExpandProperty OA3xOriginalProductKey -ErrorAction SilentlyContinue)
if (!$ProductKey) {
    Write-Host "No key present"
} else {
    Write-Host "Installing $ProductKey"
    & changepk.exe /ProductKey $ProductKey
}

Share this post:

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.