Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
2
-
Windows 2015-10-07
Description
If the SCCM client has set a RebootPending status, then this should be considered a valid pending reboot condition for Puppet. Practically speaking, it seems unlikely to have an SCCM client and Puppet running on the same node, but stranger things have happened.
The check, done through WMI - is nearly identical to the one performed as part of MODULES-2658:
require 'win32ole'
|
|
root = 'winmgmts:\\\\.\\root\\ccm\\ClientSDK'
|
dsc = WIN32OLE.connect(root)
|
|
lcm = dsc.Get('CCM_ClientUtilities')
|
|
ccm = lcm.ExecMethod_('DetermineIfRebootPending')
|
|
reboot = ccm.ReturnValue == 0 && (ccm.IsHardRebootPending || ccm.RebootPending)
|
|
puts reboot
|
Obviously more error-handling is required to ensure appropriate tooling is installed.
More details are available at:
http://blogs.technet.com/b/configmgrdogs/archive/2014/09/05/wmi-powershell-and-the-configuration-manager-client.aspx
Attachments
Issue Links
- relates to
-
MODULES-2674 Reboot - Add masterless pre-suite capable of supporting dev workflow
-
- Resolved
-
-
MODULES-2641 DSC - Notify on "RebootRequired"
-
- Resolved
-
- links to