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  Duffney 1 year, 9 months ago.

  • Author
  • #32266


    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

    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

    Dave Wyatt

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

  • #32278


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

    ModuleVersion = ''

  • #32312


    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 > > 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 > > > 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

    Dave Wyatt

    Tricky, nice find!

  • #32319


    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.