mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 16:03:22 +01:00
Add list-cpu.ps1, list-motherboard.ps1, and list-ram.ps1
This commit is contained in:
parent
da9c58db56
commit
b12f9c9f45
20
Scripts/list-cpu.ps1
Normal file
20
Scripts/list-cpu.ps1
Normal file
@ -0,0 +1,20 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Lists CPU details
|
||||
.DESCRIPTION
|
||||
This PowerShell script lists the CPU details.
|
||||
.EXAMPLE
|
||||
PS> ./list-cpu
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
Get-WmiObject -Class Win32_Processor
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
20
Scripts/list-motherboard.ps1
Normal file
20
Scripts/list-motherboard.ps1
Normal file
@ -0,0 +1,20 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Lists motherboard details
|
||||
.DESCRIPTION
|
||||
This PowerShell script lists the motherboard details.
|
||||
.EXAMPLE
|
||||
PS> ./list-motherboard
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
Get-WmiObject -Class Win32_BaseBoard
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
20
Scripts/list-ram.ps1
Normal file
20
Scripts/list-ram.ps1
Normal file
@ -0,0 +1,20 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Lists RAM details
|
||||
.DESCRIPTION
|
||||
This PowerShell script lists the details of the installed RAM.
|
||||
.EXAMPLE
|
||||
PS> ./list-ram
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
Get-WmiObject -Class Win32_PhysicalMemory
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user