mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-17 02:01:01 +01:00
Update check-os.ps1
This commit is contained in:
parent
6b5a40a7b1
commit
ff9531bdfe
@ -25,7 +25,9 @@ try {
|
||||
$BuildNo = $OSDetails.BuildNumber
|
||||
$Serial = $OSDetails.SerialNumber
|
||||
$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
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user