This topic contains 7 replies, has 3 voices, and was last updated by
March 15, 2018 at 1:34 pm #96018
We have an upcoming Microsoft audit coming, and I'm trying to get ready for that by getting the serial numbers for all Windows devices in the company.
I noticed that
(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey
will give me the activation key for Windows 7, but not for Windows server editions. Ayy ideas?
Also, we have a couple of Windows XP in the company. It seems like they won't even run PowerShell.
March 15, 2018 at 1:50 pm #96029
Windows XP...no comment
In regards to your server license. Do you have a KMS server by chance? If so, check KeyManagementServiceProductKeyID
You could also just run your wmi query without the OA3xOriginalProductKey and see what returns from that query and find the right attribute.
March 15, 2018 at 1:57 pm #96030
No KMS server
I ran the query without OA3xOriginalProductKey, and there's no OA3xOriginalProductKey
it has ClientMachineID, TokenActivationGrantNumber, TokenActivationLVID, VLActivationInterval etc, but which one is the OS key?
March 15, 2018 at 2:08 pm #96033
March 15, 2018 at 2:11 pm #96036
I tried (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").productid
But, it doesn't have a .productid
the only value with a number is BuildGUID. Is that the same as OS key?
March 15, 2018 at 2:17 pm #96039
I honestly don't know.
If you go to system in control panel. What does it say for your product ID? Does it match anything you see in the registry or the WMI query? If so, well there is your answer as to what the product key. If not, you might want to take whatever that value is, and search the registry for it. Then you will know the key it is associated with and can query it on all the other machines.
March 15, 2018 at 2:27 pm #96047
ok thank you. No, I don't see the product ID in the query. I'll do some more research, thanks.
March 15, 2018 at 2:21 pm #96044ParticipantPoints: 64Rank: Member
This may get you in the right direction (not tested)
The topic ‘get windows and windows server OS activation key’ is closed to new replies.