see product key windows 10 code example
Example: how to view product key in windows 10
wmic path SoftwareLicensingService get OAxOriginalProductKey
write this in Powershell
wmic path SoftwareLicensingService get OAxOriginalProductKey
write this in Powershell