locked
Can I install a DSC Pull server using PowerShell 5.1 on Server 2008 R2? RRS feed

  • Question

  • I've tried to follow the instructions, here but using PowerShell 5.1, so I've:

    – Installed Windows Server 2008 R2 SP1 - was already installed - I'm using an existing server.
    – Installed Microsoft .NET Framework 4.5.2. (rebooted)
    – Installed Windows Management Framework 5.1. (using Win7AndW2K8R2-KB3191566-x64.zip) (rebooted)
    – Installed IIS. Select all of the default options, plus “Tracing”.  (IIS was already installed with default options plus others, including Tracing)
    – Run dism /online /Enable-Feature /FeatureName:ManagementOdata
    – Run dism /online /Enable-Feature /FeatureName:DSC-Service
    – Run $env:windir\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

    If I run 'dism /online /get-features' I get a long list which includes:

    Feature Name : ManagementOdata
    State : Enabled

    and

    Feature Name : DSC-Service
    State : Enabled

    But when I run the equivalent PowerShell commands:

    PS> Get-WindowsFeature DSC-Service
    PS>

    (no output)

    PS> Get-WindowsFeature ManagementOData
    PS>

    (no output)

    (And I can't see these anywhere in Server Manager Roles or Features.)

    In another thread, someone suggested running this:

    function Get-DSCConfig{
        Param($computer=$env:COMPUTERNAME)
        Get-CimClass -cn $computer MSFT_DSCMetaConfiguration -name root/Microsoft/Windows/DesiredStateConfiguration|
            Select-Object -ExpandProperty CimClassProperties
    }

    Get-DSCConfig machine | select name

    The output was:

    Name
    ----
    ActionAfterReboot
    AgentId
    AllowModuleOverwrite
    CertificateID
    ConfigurationDownloadManagers
    ConfigurationID
    ConfigurationMode
    ConfigurationModeFrequencyMins
    Credential
    DebugMode
    DownloadManagerCustomData
    DownloadManagerName
    LCMCompatibleVersions
    LCMState
    LCMStateDetail
    LCMVersion
    MaximumDownloadSizeMB
    PartialConfigurations
    RebootNodeIfNeeded
    RefreshFrequencyMins
    RefreshMode
    ReportManagers
    ResourceModuleManagers
    SignatureValidationPolicy
    SignatureValidations
    StatusRetentionTimeInDays

    And when I try to configure it with 

    Start-DscConfiguration -Path .\xDscWebServiceRegistrationWithSecurityBestPractices -Wait -Force -Verbose

    I get

    VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
    SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
    root/Microsoft/Windows/DesiredStateConfiguration'.
    VERBOSE: An LCM method call arrived from computer BLAH-BLAH with user sid S-1-5-21-123456789-123456789-123456789-1234.
    VERBOSE: [BLAH-BLAH]: LCM:  [ Start  Set      ]
    VERBOSE: [BLAH-BLAH]: LCM:  [ Start  Resource ]  [[WindowsFeature]DSCServiceFeature]
    VERBOSE: [BLAH-BLAH]: LCM:  [ Start  Test     ]  [[WindowsFeature]DSCServiceFeature]
    VERBOSE: [BLAH-BLAH]: LCM:  [ End    Test     ]  [[WindowsFeature]DSCServiceFeature]  in 3.6040 seconds.
    PowerShell DSC resource MSFT_RoleResource  failed to execute Test-TargetResource functionality with error message: The
    requested feature DSC-Service is not found on the target machine.
        + CategoryInfo          : InvalidOperation: (:) [], CimException
        + FullyQualifiedErrorId : ProviderOperationExecutionFailure
        + PSComputerName        : localhost


    Tuesday, May 2, 2017 5:58 AM

All replies

  • dism /online /Enable-Feature:dsc-service

    \_(ツ)_/

    Tuesday, May 2, 2017 6:13 AM
  • PS> dism /online /Enable-Feature:dsc-service

    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385

    Image Version: 6.1.7601.18489


    Error: 0x800f080c

    Feature name dsc-service is unknown.
    A Windows feature name was not recognized.
    Use the /Get-Features option to find the name of the feature in the image and try the command again.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
    Tuesday, May 2, 2017 6:30 AM
  • Sorry.  I forgot.  Feature names are case sensitive:

    dism /online /Get-FeatureInfo:DSC-Service

    dism /online /Enable-Feature:DSC-Service


    \_(ツ)_/

    Tuesday, May 2, 2017 6:37 AM
  • PS> dism /online /Get-FeatureInfo:DSC-Service

    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385

    Image Version: 6.1.7601.18489

    Feature Information:

    Feature Name : DSC-Service
    Display Name : Windows PowerShell Desired State Configuration Service
    Description : Windows PowerShell Desired State Configuration Service supports configuration management of multiple nodes
     from a single repository.
    Restart Required : Possible
    State : Enabled

    Custom Properties:

    ServerComponent\Description : Windows PowerShell Desired State Configuration Service supports configuration management o
    f multiple nodes from a single repository.
    ServerComponent\DisplayName : Windows PowerShell Desired State Configuration Service
    ServerComponent\Id : 1000
    ServerComponent\Parent : PowerShellRoot
    ServerComponent\Type : Feature
    ServerComponent\UniqueName : DSC-Service
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : ManagementOdata
    ServerComponent\Deploys\Update\Name : DSC-Service
    ServerComponent\Version\Major : 3
    ServerComponent\Version\Minor : 0

    The operation completed successfully.

    PS> dism /online /Enable-Feature:DSC-Service

    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385

    Image Version: 6.1.7601.18489

    Enabling feature(s)
    [==========================100.0%==========================]
    The operation completed successfully.

    Start-DscConfiguration -Path .\xDscWebServiceRegistrationWithSecurityBestPractices -Wait -Force -Verbose

    gave the same result as above.  Restarting (since it said Possible, above).

    Tuesday, May 2, 2017 6:55 AM
  • I got the same result, even after the restart.
    Tuesday, May 2, 2017 7:12 AM
  • You have to enable all of the services.


    \_(ツ)_/

    Tuesday, May 2, 2017 7:15 AM
  • I don't understand what you mean: all of which services?
    Tuesday, May 2, 2017 7:37 AM
  • dism /online /Enable-Feature:ManagementOdata

    and all of the other related services.


    \_(ツ)_/

    Tuesday, May 2, 2017 9:03 AM
  • Did you know that was required from the line:

    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : ManagementOdata

    in the dism /online /Get-FeatureInfo:DSC-Service output?

    If so, I ran: 

    dism /online /Enable-Feature:ManagementOdata

    and got

    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385

    Image Version: 6.1.7601.18489

    Enabling feature(s)
    [==========================100.0%==========================]
    The operation completed successfully.

    Then, I ran:

    dism /online /Get-FeatureInfo:ManagementOdata

    which gave me:

    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385

    Image Version: 6.1.7601.18489

    Feature Information:

    Feature Name : ManagementOdata
    Display Name : OData Services for Management IIS Extension
    Description : OData Services for Management enables a server to receive a management request from client that uses the O
    pen Data protocol.
    Restart Required : Possible
    State : Enabled

    Custom Properties:

    ServerComponent\Description : OData Services for Management IIS Extension enables a server to receive a management reque
    st from client that uses the Open Data protocol.
    ServerComponent\DisplayName : Management OData IIS Extension
    ServerComponent\Id : 442
    ServerComponent\Type : Feature
    ServerComponent\UniqueName : ManagementOdata
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : Web-Static-Content
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : Web-Static-Content
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : Web-Static-Content
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : Web-Static-Content
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : Web-Static-Content
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : Web-Static-Content
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : Web-Static-Content
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : Web-Static-Content
    ServerComponent\NonAncestorDependencies\ServerComponent\UniqueName : Web-Static-Content
    ServerComponent\Deploys\Update\Name : ManagementOdata
    ServerComponent\Version\Major : 8
    ServerComponent\Version\Minor : 0

    The operation completed successfully.

    So, I tried:

    dism /online /Enable-Feature:Web-Static-Content

    and got:

    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385

    Image Version: 6.1.7601.18489


    Error: 0x800f080c

    Feature name Web-Static-Content is unknown.
    A Windows feature name was not recognized.
    Use the /Get-Features option to find the name of the feature in the image and try the command again.

    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log


    Tuesday, May 2, 2017 9:56 AM