Little script to Get Windows 10/11 Product Key using PowerShell ?
Sometimes, your recovery option in windows doesnt work and you need to format your laptop but you dont know how to activate your windows again (I know that product Key is saved in BIOS in new PCs, but I'm tolking about PCs that didnt have this option).
here is a little script to get your windows product Key.
# Get the original product key from SoftwareLicensingService
$productKey = (Get-WmiObject -Query 'select * from SoftwareLicensingService').OA3xOriginalProductKey
Write-Host "Product Key : $productKey" -ForegroundColor Green
Here is the result :
Thanks
Aymen EL JAZIRI
System Admin
IT Specialist | Network & System Administrator
6 个月Thanks for sharing ! we can recover all the devices keys in bulk via intune ?