Add list-bios.ps1

This commit is contained in:
Markus Fleschutz 2022-10-04 14:55:09 +02:00
parent 5ce4f60d45
commit da9c58db56

20
Scripts/list-bios.ps1 Normal file
View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Lists BIOS details
.DESCRIPTION
This PowerShell script lists the BIOS details.
.EXAMPLE
PS> ./list-bios
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
Get-CimInstance -ClassName Win32_BIOS
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}