From 3add3bef6bae988e8bcbaf71c3cf8305cf9c07fa Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Fri, 9 May 2025 11:05:38 +0200 Subject: [PATCH] Added list-installed-hotfixes.ps1 --- scripts/list-installed-hotfixes.ps1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/list-installed-hotfixes.ps1 diff --git a/scripts/list-installed-hotfixes.ps1 b/scripts/list-installed-hotfixes.ps1 new file mode 100644 index 00000000..e0fcd291 --- /dev/null +++ b/scripts/list-installed-hotfixes.ps1 @@ -0,0 +1,24 @@ +<# +.SYNOPSIS + Lists the installed hotfixes +.DESCRIPTION + This PowerShell script lists the installed hotfixes. +.EXAMPLE + PS> ./list-installed-hotfixes.ps1 + + Source Description HotFixID InstalledBy InstalledOn + ------ ----------- -------- ----------- ----------- + MyPC Update KB5054977 NT AUTHORITY\SYSTEM 4/10/2025 12:00:00 AM +.NOTES + https://github.com/fleschutz/PowerShell +.LINK + Author: Markus Fleschutz | License: CC0 +#> + +try { + Get-Hotfix + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +}