My son’s computer blew up and we didn’t have a copy of the Windows key. This is something I have run into before - I typically blow Windows off new PCs and install Linux, but then occassionally want to create a Windows VM using that key. It used to be on a sticker on the laptop, but it’s not anymore. It turns out a copy of the key is stored in BIOS or UEFI and accessible via ACPI. ACPI (Advanced Configuration and Power Interface) is an abstract interface that provides a standrard way to access hardware functions.
ACPI tables are stored in /sys/firmware/acpi/tables. As an administrator, you can read those text files to see the various settings and values. The table with the Windows key is MSDM.
sudo strings /sys/firmware/acpi/tables/MSDM
I’ve seen some tools to grab the key from ACPI under Windows. I haven’t used any of these tools, but this is simple to get from a Windows command line.
wmic path softwarelicensingservice get OA3xOriginalProductKey