From 00d0fb333e2c9aaf479a40d2666a4d66828fe544 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Fri, 19 Apr 2024 16:32:40 +0200 Subject: [PATCH] Update check-pending-reboot.ps1 and install-updates.ps1 --- scripts/check-pending-reboot.ps1 | 6 +++--- scripts/install-updates.ps1 | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/check-pending-reboot.ps1 b/scripts/check-pending-reboot.ps1 index d6c1f6bc..f8a8c368 100755 --- a/scripts/check-pending-reboot.ps1 +++ b/scripts/check-pending-reboot.ps1 @@ -5,7 +5,7 @@ This PowerShell script queries pending operating system reboots and prints it. .EXAMPLE ./check-pending-reboot.ps1 - ✅ No pending system reboot + ✅ No pending reboot .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -60,11 +60,11 @@ try { $Reason += ", '...\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet'" } if ($Reason -ne "") { - Write-Host "⚠️ Pending reboot (registry contains $($Reason.substring(2)))" + Write-Host "⚠️ Pending reboot (registry got $($Reason.substring(2)))" } } if ($Reason -eq "") { - Write-Host "✅ No pending system reboot" + Write-Host "✅ No pending reboot" } exit 0 # success } catch { diff --git a/scripts/install-updates.ps1 b/scripts/install-updates.ps1 index ecca901a..f1fb24a2 100755 --- a/scripts/install-updates.ps1 +++ b/scripts/install-updates.ps1 @@ -24,6 +24,7 @@ try { if ($IsLinux) { "⏳ (1/5) Checking requirements..." + & "$PSScriptRoot/check-smart-devices.ps1" & "$PSScriptRoot/check-drive-space.ps1" / & "$PSScriptRoot/check-swap-space.ps1" & "$PSScriptRoot/check-pending-reboot.ps1" @@ -47,6 +48,7 @@ try { } else { # Windows: "⏳ (1/2) Checking requirements..." + & "$PSScriptRoot/check-smart-devices.ps1" & "$PSScriptRoot/check-drive-space.ps1" C & "$PSScriptRoot/check-swap-space.ps1" & "$PSScriptRoot/check-pending-reboot.ps1" @@ -57,7 +59,7 @@ try { & winget upgrade --all --include-unknown } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "✅ Installed updates in $elapsed sec" + "✅ Installed updates in $elapsed sec." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"