Update check-cpu.ps1, check-os.ps1, and install-powershell.ps1

This commit is contained in:
Markus Fleschutz
2022-12-28 12:21:15 +01:00
parent 141a867b06
commit 17d4839150
3 changed files with 33 additions and 5 deletions

View File

@ -46,7 +46,17 @@ try {
}
if ($IsLinux) {
"$Status CPU has $Temp"
$Name = $PSVersionTable.OS
if ($Name -like "*-generic *") {
$Arch = "x86"
} elseif ($Name -like "*-raspi *") {
$Arch = "ARM"
} else {
$Arch = ""
}
if ([System.Environment]::Is64BitOperatingSystem) { $Bits = "64-bit" } else { $Bits = "32-bit" }
$Cores = [System.Environment]::ProcessorCount
"$Status $Arch CPU $Bits ($Cores cores, $Temp)"
} else {
$Details = Get-WmiObject -Class Win32_Processor
$CPUName = $Details.Name.trim()