My Pull server seems to work pulling the configuration but no matter how I setup the modules they never get pulled over. If I place the right module on to the target machine the configuration does get applied. Why or how is this supposed to work?
Module is here:
$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules
xPSDesiredStateConfiguration_3.6.0.0.zip
xPSDesiredStateConfiguration_3.6.0.0.zip.checksum
Inside zip is folder w/version 3.6.0.0
When I execute the following API in web browser: https://PullServer:8080/PSDSCPullServer.svc/Module(ConfigurationId=‘GUID’,
ModuleName=‘xPSDesiredStateConfiguration’,
ModuleVersion=‘3.6.0.0’)/ModuleContent
I get the “ModuleContent” “.zip” downloaded. So, it is like the LCM is not doing its job. Here is the LCM config:
So from the path you supplied, you’re using an IIS pull server. I see a checksum. All is right with the world but a silly question on this statement:
“Inside zip is folder w/version 3.6.0.0”
I’m assuming the module in the zip is just the basic folder structure and does not append any version number, correct? That version number should exist only on the zip filename and in the manifests. So if you were to doubleclick “cMyModule_1.0.zip” you should see a solitary folder “cMyModule”.
If you’re certain the format is correct, you can look at the DSC eventlog on the node. It’s actually pretty good at recording why it wont download a module because it can’t be found, checksum failure, etc. And yes, I’ve had brand-new modules get zipped up and I’ve had to generate the checksum twice because for a completely unknown reason the node claimed they didn’t match the first time. I know DSC is also very sensitive to the zip format being used, too. You can’t use just any old zipping tool.
Thank you all for assisting me through this.
Rolf’s example of what the zip structure needs to be is spot on.
To be perfectly clear, you must compress the content of the version folder found within the Module folder appending the version no. to the module name with an underscore for example, module_version.zip.
Using 7-Zip did work but left me unsatisfied because it should be possible with MSFT compression.
So, how do you do that you ask?
Open the module folder
Open the version folder
-NOTE to include all files including hidden files be sure show hidden files and folders is enabled.
Select all contents and right-click use
“Send to Compressed (Zip) Folder”
A zip file will be created using the name of the
first folder which was “DSCResources.zip” for me.
Change that name to module_version.zip.
Use PS command “New-DscCheckSum
-path module_version.zip” to create
“module_version.zip.checksum”
Move these to the pull server’s module location.
This process cries out for a tool.
$env:PROGRAMFILES\WindowsPowerShell\Modules
contains many module folders and within there are multiple version folders.