Deploy modules using Powershell DSC pull server

I am trying to deploy Powershell modules from my https pull server but couldn’t. I don’t know what I’m missing here. These are things which I already did or tried:

  1. Setup a https based pull server using instructions outlined at here
  2. <li>Register a pull client using instructions mentioned here <a href="https://msdn.microsoft.com/en-us/powershell/dsc/pullclientconfignames">here</a></li>
    
    <li>On my pull server I've placed modules under C:\Program Files\WindowsPowerShell\DscService\Modules as xWebAdministration_1.12.0.0.zip and xWebAdministration_1.12.0.0.zip.checksum</li>
    

    If I double click xWebAdministration_1.12.0.0.zip file it contains: DSCResources, Examples, Tests, HighQualityResourceKitPlan.md, README.md and xWebAdministration.psd1 at root level, Under DSCResources I have all MSFT_* folders and other stuff
    This is the command I used to generate the zips and checksum:
    Publish-ModuleToPullServer -Name xWebAdministration -OutputFolderPath C:\Temp\2 -ModuleBase ‘C:\Program Files\windowspowershell\modules\xWebAdministration\1.12.0.0’ -Version 1.12.0.0

    <li>When I run a custom configuration on my client node which requires xWebAdministration module, I get module not found exception.</li></ol>
    

    I looked at client’s event viewer for errors but don’t see anything related.

    Any help is appreciated. Thanks!

Is it unzipping with a root xWebAdministration folder? Or is DSCResources, et al, unzipping directly into \Modules on the node?

Yes, this is how it unzips:
C:\Program Files\WindowsPowerShell\DscService\Modules
–xWebAdministration_1.12.0.0
----DSCResources
--------MSFT_xIisFeatureDelegation
--------MSFT_xIIsHandler
--------…
----Examples
----Tests
----HighQualityResourceKitPlan.md
----LICENSE
----README.md
----xWebAdministration.psd1

That’s the problem. Don’t add the version number to the xWebAdministration folder name. The version number is only for the ZIP file. The ZIP file should unzip just an xWebAdministration folder and everything underneath.

Re-archived as per your conventions. Then run checksum cmdlet but still no change.

New-DscChecksum -Path "C:\Program Files\WindowsPowerShell\DscService\Modules" -OutPath "C:\Program Files\WindowsPowerShell\DscService\Modules" -Verbose -Force

This is LCM on client node:

ActionAfterReboot : ContinueConfiguration
AgentId : 22102E13-20FF-11E6-8115-005056A70AF0
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {[ConfigurationRepositoryWeb]DSCPullSrv}
ConfigurationID :
ConfigurationMode : ApplyAndMonitor
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData :
DownloadManagerName :
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Idle
LCMStateDetail :
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
PartialConfigurations :
RebootNodeIfNeeded : True
RefreshFrequencyMins : 30
RefreshMode : Pull
ReportManagers : {[ReportServerWeb]DSCReportSrv}
ResourceModuleManagers : {[ResourceRepositoryWeb]DSCResourceSrv}
PSComputerName :

Have you looked to see what the LCM is actually downloading and unzipping? Are there any files? What’s the output of you run the Confihuration with Wait and Verbose?

When I look into event logs on client node, I don’t see any entry which says downloading of modules.

Information 8/16/2016 12:55:18 PM Desired State Configuration 4270 None
Information 8/16/2016 12:53:12 PM Desired State Configuration 4343 None
Information 8/16/2016 12:53:12 PM Desired State Configuration 4266 None
Information 8/16/2016 12:53:12 PM Desired State Configuration 4264 None
Information 8/16/2016 12:53:11 PM Desired State Configuration 4262 None
Information 8/16/2016 12:53:11 PM Desired State Configuration 4261 None
Information 8/16/2016 12:53:11 PM Desired State Configuration 4508 None
Information 8/16/2016 12:53:11 PM Desired State Configuration 4251 None
Information 8/16/2016 12:53:11 PM Desired State Configuration 4257 None
Information 8/16/2016 12:53:11 PM Desired State Configuration 4115 None
Information 8/16/2016 12:53:07 PM Desired State Configuration 4332 None
Information 8/16/2016 12:53:06 PM Desired State Configuration 4114 None
Information 8/16/2016 12:53:06 PM Desired State Configuration 4266 None
Information 8/16/2016 12:53:06 PM Desired State Configuration 4264 None
Information 8/16/2016 12:53:06 PM Desired State Configuration 4262 None
Information 8/16/2016 12:53:06 PM Desired State Configuration 4261 None
Information 8/16/2016 12:53:06 PM Desired State Configuration 4508 None
Information 8/16/2016 12:53:04 PM Desired State Configuration 4102 Send configuration scenario for Local configuration manager
Information 8/16/2016 12:53:04 PM Desired State Configuration 4271 None
Information 8/16/2016 12:53:04 PM Desired State Configuration 4312 None

More meaningful descriptions:

  1. The local configuration manager was shut down.
  2. The DscTimer has successfully run LCM method PerformRequiredConfigurationChecks with flag 1.
  3. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Successfully sent the status report using Report Manager WebDownloadManager.
  4. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : WebReportManager for agent 22102E13-20FF-11E6-8115-005056A70AF0 Send-DscStatus command succeeded.
  5. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : WebReportManager for agent 22102E13-20FF-11E6-8115-005056A70AF0 Send-DscStatus command, POST Url: PSDSCPullServer.svc/Nodes(AgentId='22102E13-20FF-11E6-8115-005056A70AF0')/SendReport.
  6. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : WebReportManager for agent 22102E13-20FF-11E6-8115-005056A70AF0 Send-DscStatus command with server url: https://mypullsvr:8080/PSDSCPullServer.svc.
  7. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Attempting to send the status report using Report Manager WebDownloadManager. AgentId is 22102E13-20FF-11E6-8115-005056A70AF0.
  8. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Operation Consistency Check or Pull completed successfully.
  9. <li>Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Job runs under the following LCM setting. 
    

    ConfigurationMode: ApplyAndMonitor
    ConfigurationModeFrequencyMins: 15
    RefreshMode: Pull
    RefreshFrequencyMins: 30
    RebootNodeIfNeeded: NONE
    DebugMode: True

    <li>Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Consistency engine was run successfully.</li>
    
    <li>Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Resource execution sequence :: [WindowsFeature]WebServerRole, [WindowsFeature]WebAspNet45, [WindowsFeature]WebServerManagementTools, [WindowsFeature]SecurityWindowsAuth, [WindowsFeature]WcfHttpActivation.
    
  10. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Running consistency engine.
  11. <li>Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Successfully sent the status report using Report Manager WebDownloadManager.</li>
    
    <li>Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : WebReportManager for agent 22102E13-20FF-11E6-8115-005056A70AF0 Send-DscStatus command succeeded.
    
  12. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : WebReportManager for agent 22102E13-20FF-11E6-8115-005056A70AF0 Send-DscStatus command, POST Url: PSDSCPullServer.svc/Nodes(AgentId='22102E13-20FF-11E6-8115-005056A70AF0')/SendReport.
  13. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : WebReportManager for agent 22102E13-20FF-11E6-8115-005056A70AF0 Send-DscStatus command with server url: https://mypullsvr:8080/PSDSCPullServer.svc.
  14. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Attempting to send the status report using Report Manager WebDownloadManager. AgentId is 22102E13-20FF-11E6-8115-005056A70AF0.
  15. Job {E5FAB2DB-63D1-11E6-811F-005056A70AF0} : Operation Consistency Check or Pull started by user sid S-1-5-20 from computer NULL.
  16. <li>The local configuration manager started.</li>
    
    <li>The DscTimer is running LCM method PerformRequiredConfigurationChecks with the flag set to 1.</li>
    

When I try to compile a configuration which uses xWebAppPool resource from xWebAdministration module on the client node, it throws error stating:

The term 'xWebAppPool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling 
of the name, or if a path was included, verify that the path is correct and try again.

I’m not sure at this point what error we’re supposed to be chasing down. I’m going to assume you’re still asking about the original problem that you opened the thread for.

Please try running Update-DscConfiguration against the node, using the -Wait and -Verbose parameters. Additionally, please look at the node’s \Program Files\WindowsPowerShell\Modules folder to see if it thinks it’s already downloaded the module. It won’t download it if it’s already locally installed.

Sorry if my logs causes any misleading information. Yes, I’m still trying to figure out why my client node is unable to pull over modules from my pull server.
I verified that my Modules folder on client node is still empty.

This is what I get When I execute Update-DscConfiguration -Wait -Verbose command on client node:

VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = PerformRequiredConfigurationChecks,'className' = MSFT_DSCLocalConfigurationMan
ager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer clientNode with user sid S-1-5-21-4161145231-3256545308-3565119146-92289.
The specified Property does not exist.
    + CategoryInfo          : MetadataError: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 12
    + PSComputerName        : localhost
 
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 2.65 seconds

Thanks for your help!

We’ve documented that “MI RESULT 12” previously in other posts; you might search for that here. Basically, your LCM isn’t running at all, which is why nothing is downloading. Was this machine previously running a different version of WMF, and you upgraded it? What OS is it running?

It’s a brand new 2012 R2 machine with WMF RTM. No prior instances of WMF. As mentioned in my previous logs, my client seems to work pulling the configuration from the same pull server. It’s only modules which it unable to pull.

So a brand new 2012R2 machine is WMF4. If consider installing 5 if possible, and making sure it is patched. The error indicates - usually - missing CIM information, and is common when installing v5 over a preview. Otherwise, I’d open a support incident with Microsoft. You appear to be doing everything correctly; the problem is in the OS bits.

I installed WMF 5 RTM on another 2012 R2 node. It didn’t have prior preview version installed.
This client node can also pull the configuration from the pull server but no modules are downloaded. As suggested, when I run Update-DscConfiguration -Wait -Verbose on target node, this is the response:

VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = PerformRequiredConfigurationChecks,'className' = MSFT_DSCLocalConfigurationMan
ager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer target with user sid S-1-5-21-4161145231-3256545308-3565119146-56884.
VERBOSE: [target]:                            [] Executing Get-Action with configuration 's checksum: 83CC35068B9807378E366329A94E614FC99BFE052A7963DF4F999CC7F470
795B.
VERBOSE: [target]:                            [] Executing Get-Action with configuration 's checksum returned result status: Ok.
VERBOSE: [target]:                            [] Updated configuration not found on pull server so no action taken. Ensure that a configuration with a different c
hecksum exists on the pull server for target node.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 2.688 seconds

I update the configuration file (ClientConfig) on the pull server to have xWebAppPool resource.

xWebAppPool NewWebAppPool
{
    Name = 'DSPSCclient'
}

xWebAppPool is part of xWebAdministration module which i placed under C:\Program Files\WindowsPowerShell\DscService\Modules directory on the pull server as zip (xWebAdministration_1.12.0.0.zip)

When I set a new target node, it brings down the module and places it under C:\Program Files\WindowsPowerShell\Modules directory with proper directory structure.

That’s weird to me. I have 3 more modules placed under C:\Program Files\WindowsPowerShell\DscService\Modules dir on pull server as zip with checksums. These are not being downloaded on the target node, it’s only 1 module which is referred in my ClientConfig which gets pulled.

Thanks for your help!