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 16
16
"schema" : {
17
17
"embedded" : {
18
18
"$schema" : " https://json-schema.org/draft/2020-12/schema" ,
19
- "type" : " null" ,
19
+ "type" : " [object, null] " ,
20
20
"properties" : {
21
- "RebootPending " : {
21
+ "rebootPending " : {
22
22
"type" : " boolean"
23
23
}
24
24
}
Original file line number Diff line number Diff line change 1
1
# 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 }
5
5
try {
6
6
$util = [wmiclass ]" \\.\root\ccm\clientsdk:CCM_ClientUtilities"
7
7
$status = $util.DetermineIfRebootPending ()
8
8
if (($status -ne $null ) -and $status.RebootPending ){
9
- return @ { RebootPending = $true } | ConvertTo-Json - Compress
9
+ return @ { rebootPending = $true } | ConvertTo-Json - Compress
10
10
}
11
11
}catch {}
12
12
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