PsDesiredStateConfiguration DscResourceNotFound

This topic contains 3 replies, has 2 voices, and was last updated by  Don Jones 2 years, 1 month ago.

  • Author
  • #29841

    Landen Melton

    Trying to deploy a simple dsc mof to a test environment. This is a new 2012 R2 lab server. I created a simple configuration script using xComputerManagement and xPSDesiredStateConfiguration.

    Configuration StandardWeb{
            [String] $computerName
        #Import the required DSC Resources  
        Import-DscResource -Module xComputerManagement 
        Import-DscResource -Module xPSDesiredStateConfiguration
        Node $computerName{
            WindowsFeature WEBRoles{
                Name = {'FileAndStorage-Services','File-Services','FS-FileServer','Storage-Services','Web-Server'}
                Ensure = 'Present'
            xComputer SetComputerName{
                Name = $computerName
            xService DisableFirewallService{
                Name = 'Windows Firewall'
                State = 'Stopped'
                StartupType = 'Disabled'
    StandardWeb -OutputPath C:\

    The mof file creates just fine. On the test server, I download and install the WMF 5 preview, along with the DSC Resource Kit Wave 10 and extract the modules. I've tried putting the modules in both places, C:\Program Files\WindowsPowerShell\Modules and C:\Windows\System32\WindowsPowerShell\v1.0\Modules.

    Each time I try to start-dscconfiguration on the mof I get the following error.

    The PowerShell DSC resource MSFT_RoleResource from module  does not exist at the PowerShell module path nor 
    is it registered as a WMI DSC resource.
        + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
        + FullyQualifiedErrorId : DscResourceNotFound
        + PSComputerName        : IMWTEST1

    I realize this is telling me that the psDesiredStateConfiguration module isn't there, but I can do a get-dscresource and see that it is indeed there. Both the xPsDesiredStateConfiguration and the regular PSDesiredStateConfiguration.

    Can someone offer some assistance in tracking down why this server can't seem to find either of these modules?

  • #29893

    Don Jones

    I'm not sure Wave 10 is what you should be using for the latest WMF5 code. Have you tried pulling the modules using PowerShellGet? Since MS has moved the code to GitHub, they've not updated the old DSC Resource Kit.

  • #29909

    Landen Melton

    I tried to get PowerShellGet working but there was something wrong with the TLS connection (I think on my side) preventing me from getting it to work. I'll try to redo things and manually pull down the modules from GitHub if that's where the current code resides.

  • #29934

    Don Jones

    Make sure you know what you're doing. What's in Git is the dev branch and isn't necessarily stable. Be sure you're not just downloading the latest versions of files.

You must be logged in to reply to this topic.