DSC Resources not recognizing by LCM on New server

Welcome Forums DSC (Desired State Configuration) DSC Resources not recognizing by LCM on New server

This topic contains 2 replies, has 3 voices, and was last updated by

3 years ago.

  • Author
  • #38759

    Topics: 1
    Replies: 0
    Points: 0
    Rank: Member

    We are facing a weird issue using DSC at the time of deployment.

    Error Details:
    We are in the process of deploying the DSC PowerShell scripts in DEV environment for the first time. The DSC modules are copied to the Staging server to PSModulePath(C:\Program Files\WindowsPowershell\Modules), but at the time of deployment the modules are not getting recognized. This happens only when we are trying DSC deployments on the server for the first time. Rebooting the server solves the issue and DSC modules are loaded correctly. We are using WMF 4.0 .

    Reboot somehow allows us to use DSC deployments, but moving forward onto PROD environment, we cannot restart all the servers that we try deployment on. Can someone help us understand what needs to be done in order to get the DSC modules\Resources recognized by LCM without a server restart.

    Appreciate some quick help. Thanks in advance.

  • #38760

    Topics: 13
    Replies: 4872
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    I don't think I'm following what the problem is, and I'm not sure what you mean by "DSC deployments."

    So, you have a Staging server, and you're storing modules in the Program Files path. Good. Those modules would be usable by the LCM on that Staging server. Generally speaking, the LCM should be able to locate modules that are in the PSModulePath, which is what I think you're saying.

    I guess I don't understand what you mean by "at the time of deployment." What exactly are you doing? Are you copying new modules to the Staging server and finding that its LCM isn't recognizing them? How can you tell?

  • #38781

    Topics: 0
    Replies: 102
    Points: 0
    Rank: Member

    This can happen on WMF 4.0 when PSModulePath of the process and that of the system are different. This issue is fixed in WMF 5.0. One workaround that may work is to update the PSModulePath of the process to explicitly include Program Files module path, you may have to apply the configuration up to three times for the configuration to succeed. That is the only way I can think of to avoid reboot.

The topic ‘DSC Resources not recognizing by LCM on New server’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort