https://winaero.com/retrieve-the-product-key-in-windows-10-windows-8-and-windows-7-with-this-command/
Retrieve the product key in Windows 10, Windows 8 and Windows 7 with this command