From a2d2aaa932e53682be202f7563543e092f6c0422 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sat, 29 Oct 2022 17:34:15 +0200 Subject: [PATCH] Update check-pending-reboot.ps1 --- Scripts/check-pending-reboot.ps1 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Scripts/check-pending-reboot.ps1 b/Scripts/check-pending-reboot.ps1 index da85ec6c..6be41ffa 100644 --- a/Scripts/check-pending-reboot.ps1 +++ b/Scripts/check-pending-reboot.ps1 @@ -23,37 +23,37 @@ function Test-RegistryValue { param([parameter(Mandatory=$true)][ValidateNotNull $Reason = "" if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired") { - $Reason += ", found 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired' in registry" + $Reason += ", found registry entry: '...\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired'" } if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting") { - $Reason += ", found 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting' in registry" + $Reason += ", found registry entry: '...\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting'" } if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending") { - $Reason += ", found 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending' in registry" + $Reason += ", found registry entry: '...\Windows\CurrentVersion\Component Based Servicing\RebootPending'" } if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\ServerManager\CurrentRebootAttempts") { - $Reason += ", found 'HKLM:\SOFTWARE\Microsoft\ServerManager\CurrentRebootAttempts' in registry" + $Reason += ", found registry entry: '...\Microsoft\ServerManager\CurrentRebootAttempts'" } if (Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "RebootInProgress") { - $Reason += ", found 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing' with 'RebootInProgress' in registry" + $Reason += ", found registry entry: '...\Windows\CurrentVersion\Component Based Servicing' with 'RebootInProgress'" } if (Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "PackagesPending") { - $Reason += ", found 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing' with 'PackagesPending' in registry" + $Reason += ", found registry entry: '...\Windows\CurrentVersion\Component Based Servicing' with 'PackagesPending'" } #if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Value "PendingFileRenameOperations") { -# $Reason += ", found 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' with 'PendingFileRenameOperations' in registry" +# $Reason += ", found registry entry '...\CurrentControlSet\Control\Session Manager' with 'PendingFileRenameOperations'" #} if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Value "PendingFileRenameOperations2") { - $Reason += ", found 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' with 'PendingFileRenameOperations2' in registry" + $Reason += ", found registry entry '...\CurrentControlSet\Control\Session Manager' with 'PendingFileRenameOperations2'" } if (Test-RegistryValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" -Value "DVDRebootSignal") { - $Reason += ", found 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce' with 'DVDRebootSignal' in registry" + $Reason += ", found registry entry '...\Windows\CurrentVersion\RunOnce' with 'DVDRebootSignal'" } if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "JoinDomain") { - $Reason += ", found 'HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon' with 'JoinDomain' in registry" + $Reason += ", found registry entry '...\CurrentControlSet\Services\Netlogon' with 'JoinDomain'" } if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "AvoidSpnSet") { - $Reason += ", found 'HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet' in registry" + $Reason += ", found registry entry '...\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet'" } if ($Reason -ne "") { "⚠️ Pending reboot ($($Reason.substring(2)))."