![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to find Windows Product Key Using PowerShell?
Windows Product key can be retrieved using PowerShell or CMD. To retrieve the product key using PowerShell, we need to query SoftwareLicesingService class and there is a property called OA3xOriginalProductKey which stores the product key.
Example
Get-WmiObject -query `select * from SoftwareLicensingService' | Select OA3xOriginalProductKey
Output
OA3xOriginalProductKey ---------------------- BBBBB-CSDSC-EESSR-KKIDS-AAAAA
We can also query this WMI class using cmd as shown below.
wmic path softwarelicensingservice get OA3xOriginalProductKey
Caution: It may or may not work for all the Windows OS. The above is tested in Windows 10.
Advertisements