Windows Feature Installs that Require Reboot

This topic contains 1 reply, has 1 voice, and was last updated by Profile photo of Bruce Williams Bruce Williams 2 years, 5 months ago.

  • Author
    Posts
  • #16296
    Profile photo of Bruce Williams
    Bruce Williams
    Participant

    After fooling around with this for a while I've discovered the following the settings:

    RebootNodeIfNeeded = $true

    Does not work if you are running the configuration script on the machine being configured (a test environment, using a local machine top run scripts against)
    When running in pull mode after the configuration is pulled and the first WindowsFeature that needs a reboot is installed, the reboot is 'scheduled via the LCM, then the configuration is applied again moving on to the next WindowsFeature installed etc., etc.

    So if you have a number of features that are installed that require a server to be rebooted it could take quite a while to install. (I have about 52 features to install)

    Configuration ExampleConfig
    {
    Node “Server001”
    {
    LocalConfigurationManager
    {
    ConfigurationMode = "ApplyAndAutocorrect"
    RefreshMode = "Pull"
    RefreshFrequencyMins = 15
    RebootNodeIfNeeded = $true
    ConfigurationModeFrequencyMins = 30
    }

    WindowsFeature Desktop-Experience
    {
    Ensure = 'Present'
    Name = 'Desktop-Experience'
    }

    WindowsFeature Web-Mgmt-Console
    {
    Ensure = 'Present'
    Name = 'Web-Mgmt-Console'
    }
    }

    For example above script could take 1 hour to install.

    When A windows feature is installed that requires a reboot to finish, the other features will not install until the reboot is accomplished, So.... I would like to find a registry entry that changes when the Windows Feature install requires a reboot and place a restart script in the configuration script. I can check this value, and restart the server, and then when the server is restarted I will get it's config and pick up where it left off, bypassing features already installed etc, when the next windows feature that requires a reboot comes along the server will restart and go through the process again etc. etc.

    The only documentation I've found so far points to Hklm\software\Microsoft\windows\currentVersion\control\sessionmanager\pendingfilerenameoptions, from what I understand the 'pendingfilenamoptions' will only be there if a reboot is necessary, I tried it but that key was not created after a windowsfeature required a reboot.

    Any info for the reg entry would be appreciated.

    Regards,

  • #16304
    Profile photo of Bruce Williams
    Bruce Williams
    Participant

    HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending

You must be logged in to reply to this topic.