mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-10-06 01:51:59 +02: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") {
|
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
|
Loading…
Reference in New Issue
Block a user