none
windowsservercore container fails to add-windowsfeature RRS feed

  • Question

  • I've started a fresh instance of the windowsservercore container and attempted to install "Powershell Desired State Configuration" :

    PS C:\Windows\system32> add-windowsfeature dsc-service

    add-windowsfeature : An unexpected error has occurred. The system cannot find the file specified.  

    Error: 0x80070002At line:1 char:1+ add-windowsfeature dsc-service+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   

    + CategoryInfo          : InvalidResult: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exception   

    + FullyQualifiedErrorId : RegistryKey_OpenSubKey_Failed,Microsoft.Windows.ServerManager.Commands.AddWindowsFeature   

    CommandSuccess Restart Needed Exit Code      Feature Result

    -- False   No             Failed         {}


    Why did this fail? Can I install the 'DSC-Service' feature in a way that doesn't require a restart?


    Maciek

    Saturday, August 29, 2015 5:51 PM

Answers

  • Hi Maciek,

    As of now, not all windows features can be installed in a container. If you go here, you can see a list of the features that you can install right now. DSC-Service is unfortunately not one of them.

    Please remember that this is a technical preview, and we are working on making it better.



    Tuesday, September 1, 2015 7:09 PM
    Moderator

All replies

  • I've decided to give this another shot, initial attempt ended up as described above, the second attempt yielded a different result :

    PS C:\Windows\system32> add-windowsfeature dsc-service
    
    add-windowsfeature : The request to add or remove features on the specified server failed.
    
    The operation cannot be completed, because the server that you specified requires a restart.
    
    At line:1 char:1
    
    + add-windowsfeature dsc-service
    
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        + CategoryInfo          : DeviceError: (@{Vhd=; 
    Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exception
    
        + FullyQualifiedErrorId : 
    
    DISMAPI_Error__Failed_Reboot_Required,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand
    
    
    
    Success Restart Needed Exit Code      Feature Result
    
    ------- -------------- ---------      --------------
    
    False   No             Failed         {}
    
    
    PS C:\Windows\system32>

    Ok, this makes me hopeful that there may be a way to get this working? Can I Add the DSC-Service feature in a way that will not require a restart? Why does the initial attempt give a different error message?


    Maciek

    Sunday, August 30, 2015 6:01 PM
  • Third attempt yielded an even different error :

    PS C:\Windows\system32> add-windowsfeature dsc-service
    
    add-windowsfeature : ArgumentNotValid: The role, role service, or feature name is not valid: 'dsc-service'.
    The name was not found.
    At line:1 char:1
    + add-windowsfeature dsc-service
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (dsc-service:String) [Install-WindowsFeature], Exception
        + FullyQualifiedErrorId : NameDoesNotExist,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand

    To be honest, I'm a bit puzzled. I've decided to try DISM next, and used :

    dism /online /enable-feature /featurename:DSC-Service

    I've got a "The operation completed succesfully" message so I assumed all was good, however when I checked the installed features list via Get-WindowsFeature - the DSC-Service feature was still unchecked. 

    Get-Command -Module DSC-Service also does not yield any results.

    Please advise.



    Maciek

    Sunday, August 30, 2015 6:12 PM
  • It appears that DISM may have installed the DSC-Service properly afterall - however the PS Get-WindowsFeature interface is giving me false negatives :

    I tried this :

    PS C:\Windows\system32> get-dscresource

    ImplementedAs   Name                      ModuleName                     Version    Properties
    -------------   ----                      ----------                     -------    ----------
    Binary          File                                                                {DestinationPath, Attributes, Ch...
    PowerShell      Archive                   PSDesiredStateConfiguration    1.1        {Destination, Path, Checksum, Cr...
    PowerShell      Environment               PSDesiredStateConfiguration    1.1        {Name, DependsOn, Ensure, Path...}
    PowerShell      Group                     PSDesiredStateConfiguration    1.1        {GroupName, Credential, DependsO...
    Binary          Log                       PSDesiredStateConfiguration    1.1        {Message, DependsOn, PsDscRunAsC...
    PowerShell      Package                   PSDesiredStateConfiguration    1.1        {Name, Path, ProductId, Argument...
    PowerShell      Registry                  PSDesiredStateConfiguration    1.1        {Key, ValueName, DependsOn, Ensu...
    PowerShell      Script                    PSDesiredStateConfiguration    1.1        {GetScript, SetScript, TestScrip...
    PowerShell      Service                   PSDesiredStateConfiguration    1.1        {Name, BuiltInAccount, Credentia...
    PowerShell      User                      PSDesiredStateConfiguration    1.1        {UserName, DependsOn, Descriptio...
    PowerShell      WaitForAll                PSDesiredStateConfiguration    1.1        {NodeName, ResourceName, Depends...
    PowerShell      WaitForAny                PSDesiredStateConfiguration    1.1        {NodeName, ResourceName, Depends...
    PowerShell      WaitForSome               PSDesiredStateConfiguration    1.1        {NodeCount, NodeName, ResourceNa...
    PowerShell      WindowsFeature            PSDesiredStateConfiguration    1.1        {Name, Credential, DependsOn, En...
    PowerShell      WindowsOptionalFeature    PSDesiredStateConfiguration    1.1        {Name, DependsOn, Ensure, LogLev...
    PowerShell      WindowsProcess            PSDesiredStateConfiguration    1.1        {Arguments, Path, Credential, De...

    And this :

    PS C:\Windows\system32> get-command -module psdesiredstateconfiguration

    CommandType     Name                                               Version    Source
    -----------     ----                                               -------    ------
    Function        Configuration                                      1.1        PSDesiredStateConfiguration
    Function        Disable-DscDebug                                   1.1        PSDesiredStateConfiguration
    Function        Enable-DscDebug                                    1.1        PSDesiredStateConfiguration
    Function        Find-DscResource                                   1.1        PSDesiredStateConfiguration
    Function        Get-DscConfiguration                               1.1        PSDesiredStateConfiguration
    Function        Get-DscConfigurationStatus                         1.1        PSDesiredStateConfiguration
    Function        Get-DscLocalConfigurationManager                   1.1        PSDesiredStateConfiguration
    Function        Get-DscResource                                    1.1        PSDesiredStateConfiguration
    Function        New-DscChecksum                                    1.1        PSDesiredStateConfiguration
    Function        Remove-DscConfigurationDocument                    1.1        PSDesiredStateConfiguration
    Function        Restore-DscConfiguration                           1.1        PSDesiredStateConfiguration
    Function        Stop-DscConfiguration                              1.1        PSDesiredStateConfiguration
    Cmdlet          Invoke-DscResource                                 1.1        PSDesiredStateConfiguration
    Cmdlet          Publish-DscConfiguration                           1.1        PSDesiredStateConfiguration
    Cmdlet          Set-DscLocalConfigurationManager                   1.1        PSDesiredStateConfiguration
    Cmdlet          Start-DscConfiguration                             1.1        PSDesiredStateConfiguration
    Cmdlet          Test-DscConfiguration                              1.1        PSDesiredStateConfiguration
    Cmdlet          Update-DscConfiguration                            1.1        PSDesiredStateConfiguration

    Please advise on the Add-WindowsFeature cmdlet - is it working as expected?


    Maciek

    Sunday, August 30, 2015 6:15 PM
  • Hi Maciek,

    As of now, not all windows features can be installed in a container. If you go here, you can see a list of the features that you can install right now. DSC-Service is unfortunately not one of them.

    Please remember that this is a technical preview, and we are working on making it better.



    Tuesday, September 1, 2015 7:09 PM
    Moderator
  • Hi Ender, 

    Thanks for the response, I understand completely. 

    Please note that the link you gave me returns a 403 (IIS level error) - or is that an intranet link?



    Maciek


    Wednesday, September 2, 2015 8:56 AM
  • Hi Maciek,

    Here are the external links:

    Optional Features

    General "Work in Progress"Information

    Hope this helps,

    Lars


    This posting is provided AS IS with no warranties, and confers no rights. You assume all risk for your use.


    Wednesday, September 2, 2015 4:26 PM
  • Hi Lars,

    Link 1 : 404 (missing ':' in http//)

    Link 2 : 404 (http:// at the end of it)


    Maciek


    Wednesday, September 2, 2015 7:11 PM
  • Hi Maciek - thanks! Corrected above... Damn... I should not post links without double-checking.

    Lars

    Wednesday, September 2, 2015 8:12 PM