File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1616 "schema" : {
1717 "embedded" : {
1818 "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
19- "type" : " null" ,
19+ "type" : " [object, null] " ,
2020 "properties" : {
21- "RebootPending " : {
21+ "rebootPending " : {
2222 "type" : " boolean"
2323 }
2424 }
Original file line number Diff line number Diff line change 11 # Reg keys are documented here: https://learn.microsoft.com/en-us/mem/configmgr/core/servers/deploy/install/list-of-prerequisite-checks#pending-system-restart
2- if (Get-ChildItem " HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" - EA Ignore) { return @ { RebootPending = $true } | ConvertTo-Json - Compress }
3- if (Get-Item " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" - EA Ignore) { return @ { RebootPending = $true } | ConvertTo-Json - Compress }
4- if (Get-ItemProperty " HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" - Name PendingFileRenameOperations - EA Ignore) { return @ { RebootPending = $true } | ConvertTo-Json - Compress }
2+ if (Get-ChildItem " HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" - EA Ignore) { return @ { rebootPending = $true } | ConvertTo-Json - Compress }
3+ if (Get-Item " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" - EA Ignore) { return @ { rebootPending = $true } | ConvertTo-Json - Compress }
4+ if (Get-ItemProperty " HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" - Name PendingFileRenameOperations - EA Ignore) { return @ { rebootPending = $true } | ConvertTo-Json - Compress }
55 try {
66 $util = [wmiclass ]" \\.\root\ccm\clientsdk:CCM_ClientUtilities"
77 $status = $util.DetermineIfRebootPending ()
88 if (($status -ne $null ) -and $status.RebootPending ){
9- return @ { RebootPending = $true } | ConvertTo-Json - Compress
9+ return @ { rebootPending = $true } | ConvertTo-Json - Compress
1010 }
1111 }catch {}
1212
13- return @ { RebootPending = $false } | ConvertTo-Json - Compress
13+ return @ { rebootPending = $false } | ConvertTo-Json - Compress
You can’t perform that action at this time.
0 commit comments