Why certain Windows Features refuse to configure themselves?

This topic contains 5 replies, has 4 voices, and was last updated by  daniel 2 days ago.

  • Author
    Posts
  • #101061

    Mark Kharitonov
    Participant

    Here is my Azure Automation DSC script:

    Configuration QAWebServer
    {
        Import-DscResource -ModuleName PSDesiredStateConfiguration
    
        $Features = @(
            'FS-FileServer',
            'Web-Dyn-Compression',
            'Web-Net-Ext',
            'Web-AppInit',
            'Web-Asp-Net',
            'NET-Framework-Core',
            'NET-HTTP-Activation',
            'NET-Non-HTTP-Activ',
            'NET-WCF-HTTP-Activation45',
            'NET-WCF-MSMQ-Activation45',
            'NET-WCF-Pipe-Activation45',
            'NET-WCF-TCP-Activation45',
            'MSMQ-Server',
            'PowerShell-V2',
            'WAS-Process-Model',
            'WAS-NET-Environment',
            'WAS-Config-APIs'
        )
    
        node localhost
        {
            WindowsFeatureSet Features
            {
                Name = $Features
                Ensure = "Present"
            }
        }
    }
    

    Trying to apply it to a node in Azure Automation account fails:

    Resource0::[WindowsFeatureSet	00:00:01	Compliant
    Resource1::[WindowsFeatureSet	00:00:01	Compliant
    Resource3::[WindowsFeatureSet	00:00:06	Compliant
    Resource8::[WindowsFeatureSet	00:00:06	Compliant
    Resource9::[WindowsFeatureSet	00:00:01	Compliant
    Resource10::[WindowsFeatureSet	00:00:01	Compliant
    Resource11::[WindowsFeatureSet	00:00:01	Compliant
    Resource12::[WindowsFeatureSet	00:00:01	Compliant
    Resource14::[WindowsFeatureSet	00:00:06	Compliant
    Resource16::[WindowsFeatureSet	00:00:06	Compliant
    Resource2::[WindowsFeatureSet	00:00:30	Failed
    Resource4::[WindowsFeatureSet	00:00:36	Failed
    Resource5::[WindowsFeatureSet	00:00:17	Failed
    Resource6::[WindowsFeatureSet	00:00:46	Failed
    Resource7::[WindowsFeatureSet	00:00:28	Failed
    Resource13::[WindowsFeatureSet	00:00:15	Failed
    Resource15::[WindowsFeatureSet	00:00:17	Failed
    

    The error message captured in the event log or in Azure is pretty useless. For example:

    The PowerShell DSC resource '[WindowsFeature]Resource2::[WindowsFeatureSet]Features' with SourceInfo '::14::1::WindowsFeature' threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
    

    The error message is:

    The request to add or remove features on the specified server failed.
    Installation of one or more roles, role services, or features failed.
    The source files could not be found.
    Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f081f

    I am still puzzled what is wrong with the configuration. How do I fix it?

  • #101064

    Mark Kharitonov
    Participant

    Here is my Azure Automation DSC script:

    Configuration QAWebServer
    {
        Import-DscResource -ModuleName PSDesiredStateConfiguration
    
        $Features = @(
            'FS-FileServer',
            'Web-Dyn-Compression',
            'Web-Net-Ext',
            'Web-AppInit',
            'Web-Asp-Net',
            'NET-Framework-Core',
            'NET-HTTP-Activation',
            'NET-Non-HTTP-Activ',
            'NET-WCF-HTTP-Activation45',
            'NET-WCF-MSMQ-Activation45',
            'NET-WCF-Pipe-Activation45',
            'NET-WCF-TCP-Activation45',
            'MSMQ-Server',
            'PowerShell-V2',
            'WAS-Process-Model',
            'WAS-NET-Environment',
            'WAS-Config-APIs'
        )
    
        node localhost
        {
            WindowsFeatureSet Features
            {
                Name = $Features
                Ensure = "Present"
            }
        }
    }
    

    Trying to apply it to a node in Azure Automation account fails:

    Resource0::[WindowsFeatureSet	00:00:01	Compliant
    Resource1::[WindowsFeatureSet	00:00:01	Compliant
    Resource3::[WindowsFeatureSet	00:00:06	Compliant
    Resource8::[WindowsFeatureSet	00:00:06	Compliant
    Resource9::[WindowsFeatureSet	00:00:01	Compliant
    Resource10::[WindowsFeatureSet	00:00:01	Compliant
    Resource11::[WindowsFeatureSet	00:00:01	Compliant
    Resource12::[WindowsFeatureSet	00:00:01	Compliant
    Resource14::[WindowsFeatureSet	00:00:06	Compliant
    Resource16::[WindowsFeatureSet	00:00:06	Compliant
    Resource2::[WindowsFeatureSet	00:00:30	Failed
    Resource4::[WindowsFeatureSet	00:00:36	Failed
    Resource5::[WindowsFeatureSet	00:00:17	Failed
    Resource6::[WindowsFeatureSet	00:00:46	Failed
    Resource7::[WindowsFeatureSet	00:00:28	Failed
    Resource13::[WindowsFeatureSet	00:00:15	Failed
    Resource15::[WindowsFeatureSet	00:00:17	Failed
    

    The error message captured in the event log or in Azure is pretty useless. For example:

    The PowerShell DSC resource '[WindowsFeature]Resource2::[WindowsFeatureSet]Features' with SourceInfo '::14::1::WindowsFeature' threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
    

    The error message is:

    The request to add or remove features on the specified server failed.
    Installation of one or more roles, role services, or features failed.
    The source files could not be found.
    Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f081f

    I am still puzzled what is wrong with the configuration. How do I fix it?

  • #101071

    Don Jones
    Keymaster

    Please don't double post – yours was held for moderation. Allow us 24-48h if a post doesn't appear right away.

    It's saying it can't find the install source. Which means either the base OS image doesn't have it or you've not provided a valid source location it can access.

  • #101085

    Mark Kharitonov
    Participant

    I am still unclear as to how to fix it. What is this source, exactly?

    • #101449

      Will Anderson
      Keymaster

      Looking at one of the Windows Features, it looks like there are pre-requisite requirements and a possible reboot.

      PS C:\Windows\system32> Install-WindowsFeature -Name 'WAS-Config-APIs' -Verbose -WhatIf
      VERBOSE: Installation started... 
      What if: Continue with installation?
      VERBOSE: Prerequisite processing started...
      VERBOSE: Prerequisite processing succeeded.
      VERBOSE: Note: Running in 'WhatIf' Mode.
      What if: Performing installation for "[Windows Process Activation Service] Configuration APIs".
      What if: Performing installation for "[Windows Process Activation Service] Windows Process Activation Service".
      What if: The target server may need to be restarted after the installation completes.
      
      Success Restart Needed Exit Code      Feature Result                               
      ------- -------------- ---------      --------------                               
      True    Maybe          Success        {Configuration APIs, Windows Process Activ...
      VERBOSE: Installation succeeded.

      I'd recommend looking at adding xPendingReboot to your configuration. Furthermore, you may have to separate those configuration items that require additional pre-requisite components to install after xPendingReboot if that alone doesn't take care of it.

      Typically, I don't feed my component installations in as a hashtable, but rather separate them as their own configuration items and have them ordered with DependsOn. It's easier from a readability, order of operations, and auditing perspective.

  • #102791

    daniel
    Participant

    In Services, the particular service, there are dependancies and Recovery options (which is probably what you refer to)
    In windows update you can configure to notify, any installation is then your call, once you have checked its purpose.
    MS in the past received much criticism due to critical updates, and firewall haveing to be turned on during the win setup process. Too many peoples failed to do so, hence the process is now automatic. Regarding security it could be said they are at fault whichever path they take, but then it could be said the end user is on the whole ignorant when it comes too security.
    Not haveing any AV protection does in my opinion border on the idiotic, a virus or malware is not neccessarily distributed by mail or an installation of something.
    For my part I see no purpose in attempting to disable these services, but thats just IMO
    Appplications auto running on start are usually an option of that app installation and or its options

You must be logged in to reply to this topic.