Update check-pending-reboot.ps1

This commit is contained in:
Markus Fleschutz 2022-10-24 11:43:54 +02:00
parent 3feaace049
commit 88f2492f99

View File

@ -55,9 +55,9 @@ if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon"
if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "AvoidSpnSet") { if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "AvoidSpnSet") {
$Reason += ", found 'HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet' in registry" $Reason += ", found 'HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet' in registry"
} }
if ($Reason -eq "") { if ($Reason -ne "") {
"✅ No pending reboot." "⚠️ Pending reboot ($($Reason.substring(2)))."
} else { } else {
"⚠️ Pending reboot$Reason." "✅ No pending reboot."
} }
exit 0 # success exit 0 # success