Update check-bios.ps1 and check-ram.ps1

This commit is contained in:
Markus Fleschutz 2022-12-19 19:51:29 +01:00
parent c83f590247
commit 3f5188ceb9
2 changed files with 12 additions and 11 deletions

View File

@ -5,7 +5,7 @@
This PowerShell script queries BIOS details and prints it. This PowerShell script queries BIOS details and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-bios PS> ./check-bios
V1.10 BIOS (by INSYDE Corp., S/N NXA82EV0EBB07600, version ACRSYS - 2) V1.10 BIOS (S/N NXA82EV0EBB0760, version ACRSYS - 2) by INSYDE Corp.
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES
@ -22,7 +22,7 @@ try {
$Model = $BIOS.Name.Trim() $Model = $BIOS.Name.Trim()
$Serial = $BIOS.SerialNumber.Trim() $Serial = $BIOS.SerialNumber.Trim()
$Version = $BIOS.Version.Trim() $Version = $BIOS.Version.Trim()
"$Model BIOS (by $Manufacturer, S/N $Serial, version $Version)" "$Model BIOS (S/N $Serial, version $Version) by $Manufacturer"
} }
exit 0 # success exit 0 # success
} catch { } catch {

View File

@ -5,6 +5,7 @@
This PowerShell script queries and prints details of the installed RAM. This PowerShell script queries and prints details of the installed RAM.
.EXAMPLE .EXAMPLE
PS> ./check-ram PS> ./check-ram
8GB DDR4 RAM (3200MHz, 1.2V) at P0 CHANNEL A/DIMM 0 by Samsung
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES
@ -14,7 +15,7 @@
function GetRAMType { param([int]$Type) function GetRAMType { param([int]$Type)
switch($Type) { switch($Type) {
2 { return "DRAM" } 2 { return "DRAM" }
5 { return "EDO" } 5 { return "EDO RAM" }
6 { return "EDRAM" } 6 { return "EDRAM" }
7 { return "VRAM" } 7 { return "VRAM" }
8 { return "SRAM" } 8 { return "SRAM" }
@ -28,14 +29,14 @@ function GetRAMType { param([int]$Type)
17 { return "SDRAM" } 17 { return "SDRAM" }
18 { return "SGRAM" } 18 { return "SGRAM" }
19 { return "RDRAM" } 19 { return "RDRAM" }
20 { return "DDR" } 20 { return "DDR RAM" }
21 { return "DDR2" } 21 { return "DDR2 RAM" }
22 { return "DDR2 FB-DIMM" } 22 { return "DDR2 FB-DIMM" }
24 { return "DDR3" } 24 { return "DDR3 RAM" }
26 { return "DDR4" } 26 { return "DDR4 RAM" }
27 { return "DDR5" } 27 { return "DDR5 RAM" }
28 { return "DDR6" } 28 { return "DDR6 RAM" }
29 { return "DDR7" } 29 { return "DDR7 RAM" }
default { return "RAM" } default { return "RAM" }
} }
} }
@ -68,7 +69,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 RAM at $Location ($Type, $($Speed)MHz, $($Voltage)V, $Manufacturer)" "$Capacity $Type ($($Speed)MHz, $($Voltage)V) at $Location by $Manufacturer"
} }
} }
exit 0 # success exit 0 # success