How to retrieve a windows 10 product key from install code example
Example: how to get current product key windows 10
wmic path softwarelicensingservice get OA3xOriginalProductKey
wmic path softwarelicensingservice get OA3xOriginalProductKey