How To Show Installed Windows Serial Key Using Command Prompt

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. It works for Retail & OEM licenses too.
Open an elevated Command Prompt window, type the following command and hit Enter:

3 ways to check and view MS Office 2016 Product Key. To check Office 2016 product key with command. First open Command Prompt. How to check Windows 10. May be you want to use another product key, or may be, you want to activate your newly installed Windows 8/8.1 by replacing the generic key used while installing Windows with the original product key. Method 3: Changing product key from Command Prompt. Step 1: Open Command Prompt with admin rights. To do so, switch to the Start screen, type. Unquoted Windows search path vulnerability in the Foxit Cloud Safe Update Service in the Cloud plugin in Foxit Reader 6.1 through 7.0.6.1126 allows local users to gain privileges via a Trojan horse program in the%SYSTEMDRIVE% folder. In any version of Windows, like shown for Windows 10 above, Command Prompt can also be opened by executing the cmd run command, which you can do from any Search or Cortana field in Windows, or via the Run dialog box (you can open the Run dialog box with the Win+R keyboard shortcut). We would like to be able to perform Windows licensing commands across the clusters via the command line, i.e. Display the current license status, install a product key, re-arm a trial key, etc. Unfortunately, the slmgr command always opens a dialog box to display its output, rather than writing to standard output. This is extremely unpleasant, as we'd like to be able to run parallel operations on the license status using. Can I get my Windows CD-KEY from command prompt? I'm going to re-install windows 7 but I do not know my cd-key. Windows will not start up, and all I have access to is command prompt.


Your Windows product key will be displayed.
Open an elevated PowerShell prompt window, type the following command and hit Enter:


Your Windows license key will appear! This will work on Windows 10 / 8 / 8.1 PC.
In Windows 10, the product key will probably be encrypted, tied to your Microsoft Account and stored by Microsoft in the cloud too.


Serial

Edited by FreeBooter, 12 June 2016 - 07:45 AM.

Active2 years, 1 month ago

From the Windows NT-based (Windows XP and 7 specifically) command prompt, how can I get the serial number of a hard drive as a variable? The one I'm looking at is the serial number of the physical hard disk drive

Canadian Luke
Canadian LukeCanadian Luke
18.5k33 gold badges97 silver badges153 bronze badges

4 Answers

vol C:

this will get the volume serial number given to it by windows.

wmic diskdrive get serialnumber

this gets the manufacturers serial number of the hard drive.

MoabMoab
52.3k14 gold badges97 silver badges161 bronze badges
Installed
  • What you are looking at is NOT the hard drive serial number.

  • It is called the Volume Serial Number. It is generated at the time of creating and formatting the volume / partition.

  • You can get it by using a command at command prompt : C:> vol c: if C: is the drive you want to retrieve the Volume Serial Number for.

  • All you can do is redirect the output of that command to a file : C:> vol c: > myvol.txt and it will be stored as a text file in your C:

    Toshiba satellite recovery disk l775-s7307 with windows serial key

  • I am attaching a screenshot with the highlights:

  • The file was stored in the root of C:
  • This is what the myvol.txt file looks like in Notepad:

How To Show Installed Windows Serial Key Using Command Prompt Key

aliasgaraliasgar

How To Show Installed Windows Serial Key Using Command Prompts

In a batch file one approach is:

  1. VOL command to produce the serial number as text along with text we don't want.
  2. FIND to trim it down to only the line with the serial number.
  3. FOR to grab the 5th token (a part between delimiters) on the line with the serial number.
  4. SET to assign to an environment variable
BrianBrian

In the same vein as Moab's answer, but using PowerShell this time:

This command gets an instance of the Win32_DiskDrive WMI class and outputs the model of each disk drive in the computer and its corresponding serial number from that instance.

This answer assumes PowerShell 3.0 or later. If running an older version, use Get-WmiObject in place of Get-CimInstance.

On Windows 8 and later, you can also use this command:

How To Show Installed Windows Serial Key Using Command Prompt Windows 10

bwDracobwDraco
37.7k37 gold badges143 silver badges179 bronze badges

protected by bwDracoFeb 11 '18 at 19:14

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged windowscommand-line or ask your own question.