mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-16 02:49:10 +01:00
Update check-pending-reboot.ps1
This commit is contained in:
parent
3feaace049
commit
88f2492f99
@ -55,9 +55,9 @@ if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon"
|
||||
if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "AvoidSpnSet") {
|
||||
$Reason += ", found 'HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet' in registry"
|
||||
}
|
||||
if ($Reason -eq "") {
|
||||
"✅ No pending reboot."
|
||||
if ($Reason -ne "") {
|
||||
"⚠️ Pending reboot ($($Reason.substring(2)))."
|
||||
} else {
|
||||
"⚠️ Pending reboot$Reason."
|
||||
"✅ No pending reboot."
|
||||
}
|
||||
exit 0 # success
|
Loading…
Reference in New Issue
Block a user