mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-14 14:08:17 +02:00
Update check-os.ps1
This commit is contained in:
parent
6b5a40a7b1
commit
ff9531bdfe
@ -25,7 +25,9 @@ try {
|
|||||||
$BuildNo = $OSDetails.BuildNumber
|
$BuildNo = $OSDetails.BuildNumber
|
||||||
$Serial = $OSDetails.SerialNumber
|
$Serial = $OSDetails.SerialNumber
|
||||||
$InstallDate = $OSDetails.InstallDate
|
$InstallDate = $OSDetails.InstallDate
|
||||||
"✅ $($Name) ($Arch, v$Version, S/N $Serial) installed on $($InstallDate.ToShortDateString())"
|
|
||||||
|
$ProductKey = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" -Name BackupProductKeyDefault).BackupProductKeyDefault
|
||||||
|
"✅ $Name ($Arch, v$Version, S/N $Serial, key $ProductKey) since $($InstallDate.ToShortDateString())"
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user