Pull Server Module file X did not contain a module with required version X.X.X

Tagged: ,

This topic contains 5 replies, has 2 voices, and was last updated by Profile photo of Duffney Duffney 1 year, 6 months ago.

  • Author
    Posts
  • #32266
    Profile photo of Duffney
    Duffney
    Participant

    I'm getting this error every time I specify a resource on the pull server that the client computer doesn't have. I can tell the LCM is trying to pull the resource from C:\Program Files\WindowsPowerShell\DscService\Modules because if I remove it I get a different error. Below is the full error. I've zipped up the files with modulename_version.zip so I'm at a lose as to why it's not working...

    Module file xTimeZone did not contain a module with required version 1.3.0.0.

    Zip FileName:xTimeZone_1.3.0.0.zip
    Checksum Name: xTimeZone_1.3.0.0.zip.checksum

    Configuration Code
    configuration HydraFileConfig {

    Import-DscResource -Module xTimeZone

    Node HTTPComputers {

    xTimeZone SystemTimeZone {
    TimeZone = 'Central Standard Time'
    IsSingleInstance = 'Yes'
    }
    }
    }

  • #32277
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    If you unzip your file, what version number is in the xTimeZone.psd1 manifest?

  • #32278
    Profile photo of Duffney
    Duffney
    Participant

    Appears to be the right version, perhaps relevant I'm using 2016 server TP4.

    ModuleVersion = '1.3.0.0'

  • #32312
    Profile photo of Duffney
    Duffney
    Participant

    I found the problem, with new modules downloaded by PowerShell package manager or from github they include an extra subfolder with the version. This causes DSC to extract it and add an additional subfolder with the version. The fix is to remove the version subfolder before sending it to a .zip file.

    Example: xTimeZone

    xTimeZone by default has the following structure
    xTimeZone > 1.3.0.0 > Resources
    When it is send to the .zip it has the same structure, but when extracted on the client of the pull server it adds an extra folder.
    xTimeZone > 1.3.0.0 > 1.3.0.0 > Resources

    This was the cause of the error I saw, the fix is to remove the version subfolder before compressing to a .zip that way when DSC extracts it the additional version folder is not created.

  • #32314
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Tricky, nice find!

  • #32319
    Profile photo of Duffney
    Duffney
    Participant

    Below is a script that will create the .zip for you. I'm working on converting it to a function and adding the checksum to it.

You must be logged in to reply to this topic.