DSC resource pull issues.

Resource pull suddenly stopped working. The following is logged in eventvwr. The module is present at C:\Program Files\WindowsPowerShell\DscService\Modules\xPSDesiredStateConfiguration_6.4.0.0.zip.

Job {2676CBEB-70A1-11E7-8147-005056A61D85} :
MIResult: 6
Error Message: The PowerShell DSC resource MSFT_xRemoteFile from module does not exist at the PowerShell module path nor is it registered as a WMI DSC resource. LCM failed to start desired state configuration manually.
Message ID: DscResourceNotFound
Error Category: 7
Error Code: 6
Error Type: MI

I’ve restarted the server, iis to no avail.

The zip file is present at that location or the module?

Is this using Pull Server or the Azure service?

So, first you need to check and make sure that the folder containing the ZIP is what the Pull Server is configured to use as its Resource path. Also ensure a valid checksum file exists.

The error message you showed is obviously from the client; it’d be nice to start a trace and see if the server itself throws anything.

A restart rarely accomplished anything when it comes to the pull server, so I wouldn’t waste time on more of those ;).

A concern is that the LCM isn’t logging the module name, though. That makes me suspect a problem on the node, where, again, restarting the server wouldn’t have had any effect. A more detailed log - e.g., Debug or Diagnostics, not Operational - might indicate something more. Based solely on what you’ve posted, I don’t even see the LCM attempting to pull the module.

It might be worth deleting any local copy of the module that the node already has, and seeing what it does.

DSC pull server.

The module is zipped as xPSDesiredStateConfiguration_6.4.0.0.zip in \Program Files\WindowsPowerShell\DscService\Modules\

couple of additional things you can do:

  1. Check the Meta configuration settings for ResourceModuleManagers and see if server is reachable by other means (invoke-WebRequest).
  2. On client side, DSC will always go through module discovery and download as necessary and along the way would write events to ETW channel mainly as verbose messages, look for them for any useful information.
  3. Use xDscDiagnostics module
    GitHub - dsccommunity/xDscDiagnostics: This module contains cmdlets for analyzing DSC event logs.
    to troubleshoot or share the logs.

The diagnostics don’t seem to offer any more information than the event log unless I’m doing it wrong. I’m baffled, it was working and nothing changed.

Events on all clients.

Job {8613E006-720C-11E7-8148-005056A61D85} :
MIResult: 6
Error Message: The PowerShell DSC resource MSFT_xRemoteFile from module does not exist at the PowerShell module path nor is it registered as a WMI DSC resource. LCM failed to start desired state configuration manually.
Message ID: DscResourceNotFound
Error Category: 7
Error Code: 6
Error Type: MI

Http Client 33FF2DB4-709C-11E7-8147-005056A61D85 failed for WebReportManager for configuration
FullyQualifiedErrorId :ReportManagerSendStatusReportUnsuccessful
CategoryInfo:InvalidResult: (:slight_smile: , InvalidOperationException
ExceptionMessage:The attempt to send status report to the server https://mydscserver:8080/PSDSCPullServer.svc/Nodes(AgentId=‘33FF2DB4-709C-11E7-8147-005056A61D85’)/SendReport returned unexpected response code NotFound.

Diag.

Operation Consistency Check or Pull started by user sid S-1-5-20 from computer NULL.

Attempting to send the status report using Report Manager WebDownloadManager. AgentId is
33FF2DB4-709C-11E7-8147-005056A61D85.

WebReportManager for agent 33FF2DB4-709C-11E7-8147-005056A61D85 Send-DscStatus command using certificate id:
c7c31f596a9b5b8dbf418fc17c52803ae5cd806c.

WebReportManager for agent 33FF2DB4-709C-11E7-8147-005056A61D85 Send-DscStatus command with server url:
https://mydscserver:8080/PSDSCPullServer.svc.

WebReportManager for agent 33FF2DB4-709C-11E7-8147-005056A61D85 Send-DscStatus command, POST Url:
PSDSCPullServer.svc/Nodes(AgentId=‘33FF2DB4-709C-11E7-8147-005056A61D85’)/SendReport.

Http Client 33FF2DB4-709C-11E7-8147-005056A61D85 failed for WebReportManager for configuration
FullyQualifiedErrorId :ReportManagerSendStatusReportUnsuccessful
CategoryInfo:InvalidResult: (:slight_smile: , InvalidOperationException
ExceptionMessage:The attempt to send status report to the server https://mydscserver:8080/PSDSCPullS
erver.svc/Nodes(AgentId=‘33FF2DB4-709C-11E7-8147-005056A61D85’)/SendReport returned unexpected response code
NotFound.
, InnerException
.

Running consistency engine.

MIResult: 6
Error Message: The PowerShell DSC resource MSFT_xRemoteFile from module
does not exist at the PowerShell module path nor is it registered as
a WMI DSC resource.
Message ID: DscResourceNotFound
Error Category: 7
Error Code: 6
Error Type: MI

Job runs under the following LCM setting.
ConfigurationMode: ApplyAndAutoCorrect
ConfigurationModeFrequencyMins: 120
RefreshMode: PUSH
RefreshFrequencyMins: 60
RebootNodeIfNeeded: NONE
DebugMode: False

WebReportManager for agent 33FF2DB4-709C-11E7-8147-005056A61D85 Send-DscStatus command using certificate id:
c7c31f596a9b5b8dbf418fc17c52803ae5cd806c.

WebReportManager for agent 33FF2DB4-709C-11E7-8147-005056A61D85 Send-DscStatus command, POST Url:
PSDSCPullServer.svc/Nodes(AgentId=‘33FF2DB4-709C-11E7-8147-005056A61D85’)/SendReport.

Attempting to send the status report using Report Manager WebDownloadManager. AgentId is
33FF2DB4-709C-11E7-8147-005056A61D85.

WebReportManager for agent 33FF2DB4-709C-11E7-8147-005056A61D85 Send-DscStatus command with server url:
https://mydscserver:8080/PSDSCPullServer.svc.

Http Client 33FF2DB4-709C-11E7-8147-005056A61D85 failed for WebReportManager for configuration
FullyQualifiedErrorId :ReportManagerSendStatusReportUnsuccessful
CategoryInfo:InvalidResult: (:slight_smile: , InvalidOperationException
ExceptionMessage:The attempt to send status report to the server https://mydscserver:8080/PSDSCPullS
erver.svc/Nodes(AgentId=‘33FF2DB4-709C-11E7-8147-005056A61D85’)/SendReport returned unexpected response code
NotFound.
, InnerException
.

WebReportManager for agent 33FF2DB4-709C-11E7-8147-005056A61D85 Send-DscStatus command using certificate id:
c7c31f596a9b5b8dbf418fc17c52803ae5cd806c.

WebReportManager for agent 33FF2DB4-709C-11E7-8147-005056A61D85 Send-DscStatus command, POST Url:
PSDSCPullServer.svc/Nodes(AgentId=‘33FF2DB4-709C-11E7-8147-005056A61D85’)/SendReport.

Attempting to send the status report using Report Manager WebDownloadManager. AgentId is
33FF2DB4-709C-11E7-8147-005056A61D85.

WebReportManager for agent 33FF2DB4-709C-11E7-8147-005056A61D85 Send-DscStatus command with server url:
https://mydscserver:8080/PSDSCPullServer.svc.

Http Client 33FF2DB4-709C-11E7-8147-005056A61D85 failed for WebReportManager for configuration
FullyQualifiedErrorId :ReportManagerSendStatusReportUnsuccessful
CategoryInfo:InvalidResult: (:slight_smile: , InvalidOperationException
ExceptionMessage:The attempt to send status report to the server https://mydscserver:8080/PSDSCPullS
erver.svc/Nodes(AgentId=‘33FF2DB4-709C-11E7-8147-005056A61D85’)/SendReport returned unexpected response code
NotFound.
, InnerException
.

Finally… Even though my issue wasn’t with the nodes registering this seems to solve it.

https://github.com/PowerShell/xPSDesiredStateConfiguration/issues/201

Update web.config dbprovider and dbconnectionstr:

Copy over fresh Devices.mdb from: C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PullServer\Devices.mdb to C:\Program Files\WindowsPowerShell\DscService\Devices.mdb

Restart app pool(s)

Re-register all nodes