Update install-updates.ps1

This commit is contained in:
Markus Fleschutz 2023-07-10 10:37:15 +02:00
parent 5a1f76ace5
commit 0eeeff2c99

View File

@ -1,9 +1,9 @@
<# <#
.SYNOPSIS .SYNOPSIS
Installs software updates Installs updates
.DESCRIPTION .DESCRIPTION
This PowerShell script installs updates for the local machine (needs admin rights). This PowerShell script installs software updates for the local machine (needs admin rights).
Use "list-updates.ps1" to list available updates. Use the script 'list-updates.ps1' to list available updates.
.EXAMPLE .EXAMPLE
PS> ./install-updates PS> ./install-updates
.LINK .LINK
@ -34,7 +34,7 @@ try {
Write-Progress -completed " " Write-Progress -completed " "
} }
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
"updates installed in $Elapsed sec" "installed the updates in $Elapsed sec"
exit 0 # success exit 0 # success
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"