From da9c58db56647074fe68b02d7923f1f2549ef44a Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Tue, 4 Oct 2022 14:55:09 +0200 Subject: [PATCH] Add list-bios.ps1 --- Scripts/list-bios.ps1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Scripts/list-bios.ps1 diff --git a/Scripts/list-bios.ps1 b/Scripts/list-bios.ps1 new file mode 100644 index 00000000..cab44c92 --- /dev/null +++ b/Scripts/list-bios.ps1 @@ -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 +} \ No newline at end of file