Update check-cpu.ps1, check-gpu.ps1, and check-ram.ps1

This commit is contained in:
Markus Fleschutz 2022-12-01 22:05:40 +01:00
parent dd4f14f6c6
commit 0654d7730b
3 changed files with 4 additions and 4 deletions

View File

@ -46,10 +46,10 @@ try {
} else { } else {
$Details = Get-WmiObject -Class Win32_Processor $Details = Get-WmiObject -Class Win32_Processor
$DeviceName = $Details.Name.trim() $DeviceName = $Details.Name.trim()
"$($DeviceName): $($Details.DeviceID), $($Details.MaxClockSpeed)MHz, $Temp" "CPU $($DeviceName) ($($Details.DeviceID), $($Details.MaxClockSpeed)MHz, $Temp)"
} }
exit 0 # success exit 0 # success
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1 exit 1
} }

View File

@ -36,7 +36,7 @@ try {
$RefreshRate = $Details.CurrentRefreshRate $RefreshRate = $Details.CurrentRefreshRate
$DriverVersion = $Details.DriverVersion $DriverVersion = $Details.DriverVersion
$Status = $Details.Status $Status = $Details.Status
"✅ GPU $($Model): $(Bytes2String $RAMSize) RAM, $($ResWidth)x$($ResHeight) pixels, $BitsPerPixel bit, $RefreshRate Hz, driver $DriverVersion, status $Status" "✅ GPU $($Model) ($(Bytes2String $RAMSize) RAM, $($ResWidth)x$($ResHeight) pixels, $BitsPerPixel bit, $RefreshRate Hz, driver $DriverVersion, status $Status)"
} }
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -52,7 +52,7 @@ try {
[float]$Voltage = $Bank.ConfiguredVoltage / 1000.0 [float]$Voltage = $Bank.ConfiguredVoltage / 1000.0
$Manufacturer = $Bank.Manufacturer $Manufacturer = $Bank.Manufacturer
$Location = "$($Bank.BankLabel)/$($Bank.DeviceLocator)" $Location = "$($Bank.BankLabel)/$($Bank.DeviceLocator)"
"$($Capacity)GB $($Type) at $($Location): $($Speed)MHz, $($Voltage)V by $Manufacturer" "$($Capacity)GB $($Type) at $($Location) ($($Speed)MHz, $($Voltage)V by $Manufacturer)"
} }
} }
exit 0 # success exit 0 # success