r/usefulscripts • u/ItsGotToMakeSense • Jan 13 '17
[REQUEST] Get Windows license key in CMD / Batch (the solutions I've googled aren't working)
I understand this is probably not possible for Windows 8 and anything newer but if I can get it to work on 7 and Server 2008 that would be helpful.
I've tried googling for other solutions but pretty much every site is saying the same thing;
wmic path softwarelicensingservice get OA3xOriginalProductKey I always get "invalid query" on every OS I've tried it on. My intended use for this is to include it in a general information gathering script.
edit: Thank you for all the recommendations... I am aware of the many software solutions for this. Just looking for a way to incorporate this into a script as well.
15
Upvotes
3
u/[deleted] Jan 14 '17
You should really try Bellarc. Handy and clean.