mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-24 10:45:44 +02:00
Updated the manuals
This commit is contained in:
@@ -25,7 +25,7 @@ PS> ./install-updates.ps1
|
||||
|
||||
|
||||
|
||||
⏳ (2/2) Installing updates from winget and Microsoft Store...
|
||||
⏳ (2/2) Updating Microsoft Store apps...
|
||||
...
|
||||
|
||||
```
|
||||
@@ -54,7 +54,7 @@ Script Content
|
||||
✅ Swap space has 1GB free (2% of 1GB used)
|
||||
✅ No pending system reboot
|
||||
|
||||
⏳ (2/2) Installing updates from winget and Microsoft Store...
|
||||
⏳ (2/2) Updating Microsoft Store apps...
|
||||
...
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
@@ -66,7 +66,8 @@ try {
|
||||
$stopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
|
||||
if ($IsLinux) {
|
||||
"⏳ (1/5) Checking update requirements..."
|
||||
"⏳ (1/5) Checking requirements..."
|
||||
& "$PSScriptRoot/check-power.ps1"
|
||||
& "$PSScriptRoot/check-smart-devices.ps1"
|
||||
& "$PSScriptRoot/check-drive-space.ps1" /
|
||||
& "$PSScriptRoot/check-swap-space.ps1"
|
||||
@@ -88,19 +89,29 @@ try {
|
||||
Write-Progress "⏳ Installing updates..."
|
||||
& sudo softwareupdate -i -a
|
||||
Write-Progress -completed " "
|
||||
} else {
|
||||
# Windows:
|
||||
"⏳ (1/2) Checking update requirements..."
|
||||
} else { # Windows:
|
||||
"⏳ (1/2) Checking requirements..."
|
||||
& "$PSScriptRoot/check-power.ps1"
|
||||
& "$PSScriptRoot/check-smart-devices.ps1"
|
||||
& "$PSScriptRoot/check-drive-space.ps1" C
|
||||
& "$PSScriptRoot/check-swap-space.ps1"
|
||||
& "$PSScriptRoot/check-pending-reboot.ps1"
|
||||
Start-Sleep -seconds 3
|
||||
""
|
||||
"⏳ (2/2) Installing updates from winget..."
|
||||
"⏳ (2/4) Updating Microsoft Store apps..."
|
||||
if (Get-Command winget -errorAction SilentlyContinue) {
|
||||
& winget upgrade --all --source=msstore --include-unknown
|
||||
}
|
||||
""
|
||||
& winget upgrade --all --source=winget
|
||||
# & winget upgrade --all --source=msstore # does not work
|
||||
"⏳ (3/4) Updating WinGet Store apps..."
|
||||
if (Get-Command winget -errorAction SilentlyContinue) {
|
||||
& winget upgrade --all --source=winget --include-unknown
|
||||
}
|
||||
""
|
||||
"⏳ (4/4) Updating Chocolatey packages..."
|
||||
if (Get-Command choco -errorAction SilentlyContinue) {
|
||||
& choco upgrade all -y
|
||||
}
|
||||
}
|
||||
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||
"✅ Updates installed in $($elapsed)s."
|
||||
@@ -111,4 +122,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(page generated by convert-ps2md.ps1 as of 01/23/2025 12:15:21)*
|
||||
*(page generated by convert-ps2md.ps1 as of 05/12/2025 22:02:54)*
|
||||
|
Reference in New Issue
Block a user