mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-08 22:10:14 +01:00
Update install-updates.ps1
This commit is contained in:
parent
5a1f76ace5
commit
0eeeff2c99
@ -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])"
|
||||||
|
Loading…
Reference in New Issue
Block a user