Hello, my testlab is exhibiting some strange behavior. I have 3 identical servers in a lab environment, running 2012 R2. All three of them had a vmware snapshot taken in mid/late November, and I am testing DSC on them using the snapshot to return them to a “state before DSC”. I could never get a compliance = $true in this environment (admittedly I never tried anything very simple). Here’s where it gets interesting:
On server 1, I installed the latest windows updates. This resulted in me seeing a new “Admin” log in DSC. (Anyone know what this log is and how I can benefit from it?). But also now my configuration succeeds on this server, but fails on my other two. This is a list of the Operational eventlogs on one of the two servers that it fails on:
12/16/2014 7:53:52 AM 4107 Information Job {D9BB5794-C1CE-4BC9-884B-DCF4EAE20063} :
Attempting to get the action from pull server using Download
Manager WebDownloadManager. Configuration Id is
82b4fe6f-554c-4095-831e-160a5b8d1598. Checksum is . Compliance
status is false.
12/16/2014 7:53:51 AM 4102 Information Job {D9BB5794-C1CE-4BC9-884B-DCF4EAE20063} :
Configuration is sent from computer NULL by user sid S-1-5-18.
12/16/2014 7:21:26 AM 4104 Error Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
This event indicates that failure happens when LCM is trying to
get the configuration from pull server using download manager
WebDownloadManager. ErrorId is 0x1. ErrorDetail is The
SendConfigurationApply function did not succeed.
12/16/2014 7:21:26 AM 4131 Error Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
DSC Engine Error :
Error Message The SendConfigurationApply function did not
succeed.
Error Code : 1
12/16/2014 7:21:26 AM 4097 Error Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
This event indicates that failure happens when LCM is processing
the configuration. ErrorId is 0x1. ErrorDetail is The
SendConfigurationApply function did not succeed.. ResourceId is
[xPackage]SQLStd2014::[rWinSQL2014]InstallSQL and SourceInfo is
C:\CieDSCCustom\Making Resources\CieCustomComposite\WindowsPowershe
ll\Modules\rWinSQL2014\DSCResources\rWinSQL2014\rWinSQL2014.schema.
psm1::102::2::xPackage. ErrorMessage is PowerShell provider
MSFT_xPackageResource failed to execute Set-TargetResource
functionality with error message: The return code -2068578304 was
not expected. Configuration is likely not correct .
12/16/2014 7:20:55 AM 4108 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Successfully got the configuration from pull server using Download
Manager WebDownloadManager.
12/16/2014 7:20:55 AM 4216 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Skipping pulling of modules since all modules specified in
configuration C:\Windows\TEMP\\635543112553717897\localhost.mof
are available.
12/16/2014 7:20:55 AM 4214 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Skipping pulling module xPSDesiredStateConfiguration with version
3.0.3.0 as it already exists in this location C:\Program Files\Wind
owsPowerShell\Modules\xPSDesiredStateConfiguration\xPSDesiredStateC
onfiguration.psd1.
12/16/2014 7:20:55 AM 4214 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Skipping pulling module cWindowsOS with version 1.0 as it already
exists in this location C:\Program
Files\WindowsPowerShell\Modules\cWindowsOS\cWindowsOS.psd1.
12/16/2014 7:20:55 AM 4214 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Skipping pulling module PSDesiredStateConfiguration with version
1.0 as it already exists in this location C:\Windows\system32\Windo
wsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStat
eConfiguration.psd1.
12/16/2014 7:20:55 AM 4211 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
The checksum validation for configuration
C:\Windows\TEMP\\635543112553717897\localhost.mof completed with
status code 0.
12/16/2014 7:20:55 AM 4211 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
The checksum validation for configuration
82b4fe6f-554c-4095-831e-160a5b8d1598 completed with status code 0.
12/16/2014 7:20:55 AM 4227 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
WebDownloadManager for configuration
82b4fe6f-554c-4095-831e-160a5b8d1598 Get-DscDocument command, GET
call result: Ok.
12/16/2014 7:20:55 AM 4229 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
WebDownloadManager for configuration
82b4fe6f-554c-4095-831e-160a5b8d1598 Get-DscDocument command, File
save result:
C:\Windows\TEMP\635543112553717897\localhost.mof.checksum.
12/16/2014 7:20:55 AM 4229 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
WebDownloadManager for configuration
82b4fe6f-554c-4095-831e-160a5b8d1598 Get-DscDocument command, File
save result: C:\Windows\TEMP\635543112553717897\localhost.mof.
12/16/2014 7:20:55 AM 4226 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
WebDownloadManager for configuration
82b4fe6f-554c-4095-831e-160a5b8d1598 Get-DscDocument command, GET
Url: PSDSCPullServer.svc/Action(ConfigurationId='82b4fe6f-554c-4095
-831e-160a5b8d1598')/ConfigurationContent.
12/16/2014 7:20:55 AM 4210 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Attempting to get the configuration
82b4fe6f-554c-4095-831e-160a5b8d1598 from pull server with Server
Url http://dyul1dsc001.cie.contoso.com:8080/PSDSCPullServer.svc
using Web Download Manager.
12/16/2014 7:20:55 AM 4105 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Attempting to get the configuration from pull server using
Download Manager WebDownloadManager.Configuration Id is
82b4fe6f-554c-4095-831e-160a5b8d1598.
12/16/2014 7:20:55 AM 4194 Error Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Failed to delete the current configuration file
12/16/2014 7:20:55 AM 4110 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Successfully got the action GetConfiguration from pull server
using Download Manager WebDownloadManager.
12/16/2014 7:20:55 AM 4246 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
WebDownloadManager for configuration
82b4fe6f-554c-4095-831e-160a5b8d1598 Do-DscAction command, GET
call result: GetConfiguration.
12/16/2014 7:20:55 AM 4245 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
WebDownloadManager for configuration
82b4fe6f-554c-4095-831e-160a5b8d1598 Do-DscAction command, GET
Url: PSDSCPullServer.svc/Action(ConfigurationId='82b4fe6f-554c-4095
-831e-160a5b8d1598')/GetAction.
12/16/2014 7:20:55 AM 4242 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
WebDownloadManager for configuration
82b4fe6f-554c-4095-831e-160a5b8d1598 Do-DscAction command with
server url:
http://dyul1dsc001.cie.contoso.com:8080/PSDSCPullServer.svc.
12/16/2014 7:20:55 AM 4107 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Attempting to get the action from pull server using Download
Manager WebDownloadManager. Configuration Id is
82b4fe6f-554c-4095-831e-160a5b8d1598. Checksum is . Compliance
status is false.
12/16/2014 7:20:54 AM 4102 Information Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :
Configuration is sent from computer NULL by user sid S-1-5-18.
12/16/2014 6:51:56 AM 4104 Error Job {F6D6AC9A-61DE-4CB0-83C5-A92DA485E50E} :
This event indicates that failure happens when LCM is trying to
get the configuration from pull server using download manager
WebDownloadManager. ErrorId is 0x1. ErrorDetail is The
SendConfigurationApply function did not succeed.
12/16/2014 6:51:56 AM 4131 Error Job {F6D6AC9A-61DE-4CB0-83C5-A92DA485E50E} :
DSC Engine Error :
Error Message The SendConfigurationApply function did not
succeed.
Error Code : 1
12/16/2014 6:51:56 AM 4097 Error Job {F6D6AC9A-61DE-4CB0-83C5-A92DA485E50E} :
This event indicates that failure happens when LCM is processing
the configuration. ErrorId is 0x1. ErrorDetail is The
SendConfigurationApply function did not succeed.. ResourceId is
[xPackage]SQLStd2014::[rWinSQL2014]InstallSQL and SourceInfo is
C:\CieDSCCustom\Making Resources\CieCustomComposite\WindowsPowershe
ll\Modules\rWinSQL2014\DSCResources\rWinSQL2014\rWinSQL2014.schema.
psm1::102::2::xPackage. ErrorMessage is PowerShell provider
MSFT_xPackageResource failed to execute Set-TargetResource
functionality with error message: The return code -2068578304 was
not expected. Configuration is likely not correct .
If I run get-dscconfiguration on a server that’s misbehaving, here’s the error I get:
PS C:\Windows\system32> Get-DscConfiguration
Get-DscConfiguration : The PowerShell provider cWindowsOS does not exist at the PowerShell module path nor is it
registered as a WMI provider.
At line:1 char:1
+ Get-DscConfiguration
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager)
[Get-DscConfiguration], CimException
+ FullyQualifiedErrorId : ModuleNameNotFound,Get-DscConfiguration
PS C:\Windows\system32>
I got that particular module from DSCResources/cWindowsOS/DSCResources at master · rchaganti/DSCResources · GitHub
I know the quick answer here is to just go and install the windows updates on my other machines. I’m just kind of looking for some understanding of what’s going on here. Moreover this leads me to another question / situation: On server1 (where I have these updates installed and I can get it compliant), if I run get-dscconfiguration everything looks great! However if I run test-dscconfiguration it returns $false. If I’m not mistaken, it should only return $false on test-config if I’m not compliant?
I just noticed a difference between the LCM paramaters between servers 1 and 2 (1 with updates, 2 without):
Server 1:
PS C:\Windows\system32> Get-DscLocalConfigurationManager
ActionAfterReboot : ContinueConfiguration
AllowModuleOverwrite : True
CertificateID :
ConfigurationID : ffd65e49-e7ae-4f17-bb46-040866081f92
ConfigurationMode : ApplyAndAutoCorrect
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData : {MSFT_KeyValuePair (key = “ServerUrl”), MSFT_KeyValuePair (key =
“AllowUnsecureConnection”)}
DownloadManagerName : WebDownloadManager
LCMCompatibleVersions : {1.0}
LCMState : Idle
LCMVersion : 1.0
RebootNodeIfNeeded : True
RefreshFrequencyMins : 30
RefreshMode : Pull
PSComputerName :
Server 2:
PS C:\Windows\system32> Get-DscLocalConfigurationManagerAllowModuleOverwrite : True
CertificateID :
ConfigurationID : 82b4fe6f-554c-4095-831e-160a5b8d1598
ConfigurationMode : ApplyAndAutoCorrect
ConfigurationModeFrequencyMins : 30
Credential :
DownloadManagerCustomData : {MSFT_KeyValuePair (key = “ServerUrl”), MSFT_KeyValuePair (key =
“AllowUnsecureConnection”)}
DownloadManagerName : WebDownloadManager
RebootNodeIfNeeded : True
RefreshFrequencyMins : 30
RefreshMode : Pull
PSComputerName :
This is the identical LCM config I sent to each:
Configuration MakeItSoPull
{
Node $allnodes.NodeName
{
LocalConfigurationManager
{
ConfigurationID = "$($Node.NodeGUID)"
RefreshMode = "PULL";
DownloadManagerName = "WebDownloadManager";
RebootNodeIfNeeded = $true;
RefreshFrequencyMins = 30;
ConfigurationModeFrequencyMins = 15;
ConfigurationMode = "ApplyAndAutoCorrect";
DownloadManagerCustomData = @{ServerUrl = "http://dyul1dsc001.cie.contoso:8080/PSDSCPullServer.svc"; AllowUnsecureConnection = “TRUE”}
AllowModuleOverwrite = $True
}
}
}
MakeItSoPull -ConfigurationData $AllServerConfigData -OutputPath "$Env:Temp\PullDSCCfg"
Set-DscLocalConfigurationManager -Path "$Env:Temp\PullDSCCfg"