Skip to content

Commit 0777706

Browse files
author
Andrew
committed
updated pproperty to camelCasing
1 parent a8a25d2 commit 0777706

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

reboot_pending/reboot_pending.dsc.resource.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
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
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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

0 commit comments

Comments
 (0)