Powershell get windows key

Powershell Get Windows Key, Type PowerShell. Whether you’re reinstalling Windows, switching devices, or backing up your license, this guide shows you the easiest ways to find your product key using built-in tools. Open PowerShell as Administrator: Click on the Start menu. Step 2: In the Windows PowerShell window, type the following text: powershell “ (Get-WmiObject -query ‘select * from SoftwareLicensingService’). Press Enter to allow the execution policy to be changed. ), REST APIs, and object models. Apr 4, 2023 · Open windows PowerShell as an administrator and type the below command and press enter - powershell " (Get-WmiObject -query 'select * from SoftwareLicensingService'). OA3xOriginalProductKey" PowerShell is a cross-platform (Windows, Linux, and macOS) automation tool and configuration framework optimized for dealing with structured data (e. Powershell script to retrieve product keys and OS information from local or remote system/s. Dec 22, 2024 · In this post, we will see how to find the original firmware-embeded Windows Product Key using Command Prompt or PowerShell, from BIOS or Registry. Aug 5, 2022 · Get-WmiObject -query 'select * from SoftwareLicensingService'). Sharing the working scripts which will find Windows License Information:. Jul 23, 2025 · You can get your Windows activation key using PowerShell or CMD with just a quick command, no extra tools or installs needed. Nov 24, 2024 · This guide explains how to use the Get-WindowsKey PowerShell script to retrieve the product key of a Windows operating system. See the commands and examples to find and verify the key. OA3xOriginalProductKey 3-PowerShell should retrieve the key and display it for you Another option is to use third-party software to do it like the NirSoft Product Key Scanner that you can see more information and download at this link. Sep 24, 2018 · Using some simple methods that involve PowerShell, Command Prompt, and Windows Registry, you can easily find the Windows product key. Jun 12, 2016 · Use Command Prompt or PowerShell to find Windows Product Key In this post, i will show you how to find the original Windows Product Key using Command Prompt or PowerShell, from BIOS or Registry. Jun 20, 2025 · You can find the Windows product key using your computer's Command Prompt, PowerShell program, or within the Windows Registry. Recently got a requirement to find Windows OS license details / Product key Info and I used a Powershell script for this. OA3xOriginalProductKey” Step 3: Press Enter. Essential for IT pros. Open PowerShell as administrator and put the following command - "Set-ExecutionPolicy RemoteSigned" 4. Learn how to find my Windows product key using CMD, PowerShell, or the Registry for Windows 11 & 10. Jul 22, 2022 · 2-Paste this command and press enter: (Get-WmiObject -query ‘select * from SoftwareLicensingService’). Run the Following Command: powershell " (Get-WmiObject -query 'select * from SoftwareLicensingService'). PowerShell includes a command-line shell, object-oriented scripting language, and a set of tools for executing scripts/cmdlets and managing modules. We would like to show you a description here but the site won’t allow us. Feb 28, 2020 · 3. OA3xOriginalProductKey I can get it using this, but it returns more than just the product key field. Jun 10, 2026 · The tool allows you to manually specify the Windows directory to scan for the product key or load the product keys from an external Software registry file (for example, from a registry backup). Jul 28, 2025 · Learn how to retrieve your Windows product key using PowerShell by querying the Windows Management Instrumentation (WMI) database. Jun 25, 2024 · Step 1: Type powershell in Windows Search. Find out how to troubleshoot common issues such as missing or incorrect keys. Sep 23, 2021 · Learn how to use command prompt or Windows PowerShell to display and check the Windows product key, a 25-character code that activates Windows. Click on the Windows PowerShell entry to open it. Get-CimInstance -ClassName SoftwareLicensingService | Select-Object -ExpandProperty OA3xOriginalProductKey This can also run against remote machines by adding the -ComputerName option. JSON, CSV, XML, etc. Jul 7, 2026 · Learn how to find a Windows 10 product key using CMD, PowerShell, third-party software or direct support from Microsoft. 5. - mattcarras/Get-ProductKey Learn how to find my Windows product key using CMD, PowerShell, or the Registry for Windows 11 & 10. May I clarify - you didn't get any error, it just didn't return the key, right? Because your earlier commands all ran into syntax issue, but if there's no error, and the key is not return, it can simply mean you don't have an OEM license on board. This guide explains how to use the Get-WindowsKey PowerShell script to retrieve the product key of a Windows operating system. It works for Retail & OEM licenses too. Jan 3, 2025 · My powershell version is lower and it works fine. Dec 16, 2024 · Whether you're reinstalling Windows 11 or just want the peace of mind of knowing where your product key resides, finding it is way easier than you think. How-to: Retrieve the Windows Product Key The Windows product key is a 25-character code used to activate Windows. In most cases, Windows will activate automatically using a digital license and doesn’t require Aug 28, 2026 · Windows product key lookup made simple: use PowerShell, Settings, SLMGR, Registry and legacy CMD methods, plus understand digital licenses. Oct 4, 2026 · Learn two methods to get your Windows product key using PowerShell commands or a script. It will display the Product Key in the next line. g. OA3xOriginalProductKey" This command also retrieves the product key from your system's BIOS/UEFI firmware. Right-click on Windows PowerShell and select Run as administrator. The script works effectively on Windows Server 2025 but may not function as expected on earlier versions due to changes in how product keys are stored or accessed in the Windows registry. This wikiHow article teaches you how to find your Windows product key so that you can activate Windows. dlh, 9809xg, skppeej, ws2d, fmm8, zyy, cz7t0g, zq5lmkj, b7ngze, cesx,