Merge d95e4fd181 into 9064a66938
This commit is contained in:
commit
a96cc92b11
1 changed files with 15 additions and 16 deletions
|
|
@ -216,8 +216,7 @@ function Test-PendingRebootRegistry() {
|
|||
Write-Log -Message "Running Test-PendingRebootRegistry function"
|
||||
$CBSRebootKey = Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -ErrorAction Ignore
|
||||
$WURebootKey = Get-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -ErrorAction Ignore
|
||||
$FileRebootKey = Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Name PendingFileRenameOperations -ErrorAction Ignore
|
||||
if (($CBSRebootKey -ne $null) -OR ($WURebootKey -ne $null) -OR ($FileRebootKey -ne $null)) {
|
||||
if (($CBSRebootKey -ne $null) -OR ($WURebootKey -ne $null)) {
|
||||
Write-Log -Message "Check returned TRUE on ANY of the registry checks: Reboot is pending!"
|
||||
$true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue