mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-22 21:58:42 +01:00
Updaate check-operating-system.ps1
This commit is contained in:
parent
9f396620df
commit
844996442b
@ -17,13 +17,15 @@ try {
|
||||
} else {
|
||||
$OS = Get-WmiObject -class Win32_OperatingSystem
|
||||
$Name = $OS.Caption
|
||||
$Architecture = $OS.OSArchitecture
|
||||
$Arch = $OS.OSArchitecture
|
||||
$Version = $OS.Version
|
||||
|
||||
[system.threading.thread]::currentthread.currentculture = [system.globalization.cultureinfo]"en-US"
|
||||
$OSDetails = Get-CimInstance Win32_OperatingSystem
|
||||
$BuildNo = $OSDetails.BuildNumber
|
||||
$Serial = $OSDetails.SerialNumber
|
||||
$InstallDate = $OSDetails.InstallDate
|
||||
"✅ $Name ($Architecture) v$Version, installed $($InstallDate.ToShortDateString())"
|
||||
"✅ $Name ($Arch, v$Version, serial $Serial), installed $($InstallDate.ToShortDateString())."
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user