Updated list-updates.ps1

This commit is contained in:
Markus Fleschutz 2024-03-03 10:32:22 +01:00
parent 80a756cf3e
commit badf775807

View File

@ -2,14 +2,15 @@
.SYNOPSIS .SYNOPSIS
Lists software updates Lists software updates
.DESCRIPTION .DESCRIPTION
This PowerShell script queries the latest available software updates for the local machine and lists it. This PowerShell script queries the latest available software updates for the
local machine and lists it.
NOTE: Use the script 'install-updates.ps1' to install the listed updates. NOTE: Use the script 'install-updates.ps1' to install the listed updates.
.EXAMPLE .EXAMPLE
PS> ./list-updates.ps1 PS> ./list-updates.ps1
Name Id Version Available Source Name Id Version Available Source
-------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------
Git Git.Git 2.41.0 2.41.0.2 winget Git Git.Git 2.43.0 2.44.0 winget
... ...
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
@ -32,7 +33,8 @@ try {
& winget upgrade --include-unknown & winget upgrade --include-unknown
Write-Progress -completed "Done." Write-Progress -completed "Done."
} }
" (use 'install-updates.ps1' to install the listed updates)" " "
"NOTE: Use the script 'install-updates.ps1' to install the listed updates."
exit 0 # success exit 0 # success
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"