Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-2659

Reboot - Should detect Configuration Manager CCM_ClientUtilities status as pending reboot condition

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      2
    • Sprint:
      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

            Activity

              People

              Assignee:
              ryan.gard Ryan Gard
              Reporter:
              ethan Ethan Brown
              QA Contact:
              Ryan Gard
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support