First, some DSC related links from the weekend. I got caught up on these today, and like usual learned quite a bit from the articles.
From The Scripting Guys:
Use Configuration File to Apply PowerShell DSC to Multiple Servers
PowerShell, Network Adapters and Domain Name System
Troubleshoot with PowerShell DSC Diagnostics Module
That last link is particularly timely, because I am still struggling with being able to Pull a Configuration from my Pull Server. I am hoping I can use the DSC Diagnostics Module to determine what is going on. I will say this, if I copy the xNetworking Module from my Pull Server to my DSCTest Server, the Configuration is applied within minutes. For some reason the DSCTest server doesn’t think it can find the xNetworking Module on the Pull Server.
1 |
Get-xDscOperation -ComputerName dsctest-01 -Newest 3 |
And here are the results. The relevant stuff is at the bottom, I am including all of it for the sake of context.
1 2 3 4 5 |
ComputerName SequenceId TimeCreated Result JobID AllEvents ------------ ---------- ----------- ------ ----- --------- dsctest-01 1 3/17/2014 3:34:56 PM Failure c97f4016-6322-4ae3-95b8-770ad180a153 {@{Message=Validat... dsctest-01 2 3/17/2014 3:06:01 PM Success e6ddf784-8f01-403c-8e60-ce3b39504cec {@{Message=Configu... dsctest-01 3 3/17/2014 3:04:40 PM Success 6266763e-4adf-49f4-9e79-85b4d3e35af6 {@{Message=Configu... |
I then run the following command to get more detail about Sequence ID 1.
1 |
Trace-xDscOperation -ComputerName dsctest-01 -SequenceID 1 | Select-Object -ExpandProperty Message |
And here is the full Message I got from the trace. The really relevant stuff is at the bottom.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
Validating DSC Provider schema against a class array of size 1 Validating Class property Value for class MSFT_KeyValuePair Validating Class property ClassName for class MSFT_BaseConfigurationProviderRegistration Validating Class property DSCEngineCompatVersion for class MSFT_BaseConfigurationProviderRegistration Validating Class property DSCModuleVersion for class MSFT_BaseConfigurationProviderRegistration Validating Class property Namespace for class MSFT_CimConfigurationProviderRegistration Validating Class property ModuleName for class MSFT_PSConfigurationProviderRegistration Validating Class property Version for class OMI_ConfigurationDocument Validating Class property Author for class OMI_ConfigurationDocument Validating Class property Copyright for class OMI_ConfigurationDocument Validating Class property HelpInfoUri for class OMI_ConfigurationDocument Validating Class property Key for class MSFT_KeyValuePair Validating Class property ContentType for class OMI_ConfigurationDocument Validating Class property GenerationHost for class OMI_ConfigurationDocument Validating Class property UserName for class MSFT_Credential Validating Class property Password for class MSFT_Credential Reading the file content from C:\Windows\System32\Configuration\BaseRegistration\MSFT_DSCMetaConfiguration.mof Validating DSC Provider schema against a class array of size 1 Reading the file content from C:\Windows\System32\Configuration\Schema\MSFT_FileDirectoryConfiguration\MSFT_FileDirectoryConfiguration.Schema.mof Validating Schema of class MSFT_FileDirectoryConfiguration which is class index 0 in an array of classes of size 1 Reading the file content from C:\Windows\System32\Configuration\Registration\MSFT_FileDirectoryConfiguration\MSFT_FileDirectoryConfiguration.Registration.mof Validating DSC Provider registration instance for class : MSFT_CimConfigurationProviderRegistration Validating provider registration against schema Number of classes: 9 Number of Registrations: 1 Validating Class property GenerationDate for class OMI_ConfigurationDocument Validating Class property ModuleVersion for class OMI_BaseResource Validating Schema of class MSFT_DSCMetaConfiguration which is class index 0 in an array of classes of size 1 Validating Class property DependsOn for class OMI_BaseResource Validating Class property SourceInfo for class OMI_BaseResource Validating Class property ResourceId for class OMI_BaseResource Validating infrastructure schema Reading the file content from C:\Windows\System32\Configuration\BaseRegistration\BaseResource.schema.mof Validating Class property ModuleName for class OMI_BaseResource Validating Class property GenerationHost for class OMI_ConfigurationDocument Validating Class property GenerationDate for class OMI_ConfigurationDocument Validating Class property ContentType for class OMI_ConfigurationDocument Validating Class property HelpInfoUri for class OMI_ConfigurationDocument Validating Class property Copyright for class OMI_ConfigurationDocument Validating Class property ModuleName for class MSFT_PSConfigurationProviderRegistration Validating Class property Version for class OMI_ConfigurationDocument Validating Class property UserName for class MSFT_Credential Validating Class property Namespace for class MSFT_CimConfigurationProviderRegistration Validating Class property DSCModuleVersion for class MSFT_BaseConfigurationProviderRegistration Validating Class property Author for class OMI_ConfigurationDocument Validating Class property Password for class MSFT_Credential Validating Class property ConfigurationModeFrequencyMins for class MSFT_DSCMetaConfiguration Validating infrastructure schema Validating Class property DSCEngineCompatVersion for class MSFT_BaseConfigurationProviderRegistration Validating Class property RebootNodeIfNeeded for class MSFT_DSCMetaConfiguration Validating Class property Credential for class MSFT_DSCMetaConfiguration Validating Class property ConfigurationMode for class MSFT_DSCMetaConfiguration Validating Class property RefreshMode for class MSFT_DSCMetaConfiguration Validating Class property CertificateID for class MSFT_DSCMetaConfiguration Validating Class property ConfigurationID for class MSFT_DSCMetaConfiguration Validating Class property DownloadManagerName for class MSFT_DSCMetaConfiguration Validating Class property DownloadManagerCustomData for class MSFT_DSCMetaConfiguration Validating Class property RefreshFrequencyMins for class MSFT_DSCMetaConfiguration Validating Class property AllowModuleOverwrite for class MSFT_DSCMetaConfiguration Reading the file content from C:\Windows\System32\Configuration\MetaConfig.mof Reading the file content from C:\Windows\System32\Configuration\BaseRegistration\MSFT_DSCMetaConfiguration.mof Validating Class property ClassName for class MSFT_BaseConfigurationProviderRegistration Validating Class property ModuleVersion for class OMI_BaseResource Validating Class property Key for class MSFT_KeyValuePair Validating Class property ModuleName for class OMI_BaseResource Validating Class property DependsOn for class OMI_BaseResource Validating Class property SourceInfo for class OMI_BaseResource Validating Class property ResourceId for class OMI_BaseResource Validating infrastructure schema Reading the file content from C:\Windows\System32\Configuration\BaseRegistration\BaseResource.schema.mof Validating Class property Value for class MSFT_KeyValuePair Reading the file content from C:\Windows\System32\Configuration\DSCEngineCache.mof Configuration is sent from computer NULL by user sid S-1-5-18. Getting Metaconfiguration details. Getting Metaconfiguration details. Reading the file content from C:\Windows\System32\Configuration\Current.mof.checksum Attempting to get the action from pull server using Download Manager WebDownloadManager. Configuration Id is a0a95372-66de-4937-896d-ac3489ab05d0. Checksum is 0B3A20CE3BCE0055B6C70B5266AED65F 860DE9A2C3664FDCCEAA86410AB911A4. Compliance status is true. WebDownloadManager for configuration a0a95372-66de-4937-896d-ac3489ab05d0 Do-DscAction command with server url: http://MyTargetServer.domain.com:8080/PSDSCPullServer.svc. WebDownloadManager for configuration a0a95372-66de-4937-896d-ac3489ab05d0 Do-DscAction command, GET Url: PSDSCPullServer.svc/Action(ConfigurationId='a0a95372-66de-4937-896d-ac3489ab05d0')/Get Action. WebDownloadManager for configuration a0a95372-66de-4937-896d-ac3489ab05d0 Do-DscAction command, GET call result: GetConfiguration. Successfully got the action GetConfiguration from pull server using Download Manager WebDownloadManager. Attempting to get the configuration from pull server using Download Manager WebDownloadManager.Configuration Id is a0a95372-66de-4937-896d-ac3489ab05d0. Attempting to get the configuration a0a95372-66de-4937-896d-ac3489ab05d0 from pull server with Server Url http://MyTargetServer.domain.com:8080/PSDSCPullServer.svc using Web Download Manager. WebDownloadManager for configuration a0a95372-66de-4937-896d-ac3489ab05d0 Get-DscDocument command, GET Url: PSDSCPullServer.svc/Action(ConfigurationId='a0a95372-66de-4937-896d-ac3489ab05d0')/ ConfigurationContent. WebDownloadManager for configuration a0a95372-66de-4937-896d-ac3489ab05d0 Get-DscDocument command, File save result: C:\Windows\TEMP\635306672954009100\localhost.mof. The checksum validation for configuration C:\Windows\TEMP\\635306672954009100\localhost.mof completed with status code 0. WebDownloadManager for configuration a0a95372-66de-4937-896d-ac3489ab05d0 Get-DscDocument command, File save result: C:\Windows\TEMP\635306672954009100\localhost.mof.checksum. WebDownloadManager for configuration a0a95372-66de-4937-896d-ac3489ab05d0 Get-DscDocument command, GET call result: Ok. The checksum validation for configuration a0a95372-66de-4937-896d-ac3489ab05d0 completed with status code 0. Attempting to get the modules {(xNetworking,2.0)} from pull server with Server Url http://MyTargetServer.domain.com:8080/PSDSCPullServer.svc using Web Download Manager. Attempting to get the modules from pull server using Download Manager WebDownloadManager. Configuration Id is a0a95372-66de-4937-896d-ac3489ab05d0. Modules are (xNetworking,2.0). WebDownloadManager Get-DscModule command, module xNetworking, GET Url: PSDSCPullServer.svc/Module(ConfigurationId='a0a95372-66de-4937-896d-ac3489ab05d0',ModuleName='xNetworking',ModuleVersion ='2.0')/ModuleContent. 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 Cannot find mo dule xNetworking.2.0 from the server http://MyTargetServer.domain.com:8080/PSDSCPullServer.svc/Module(ConfigurationId='a0a95372-66de-4937-896d-ac3489ab05d0',ModuleName='xNetworking',ModuleVersion= '2.0')/ModuleContent. WebDownloadManager Get-DscModule command, module xNetworking, GET call result: Cannot find module xNetworking.2.0 from the server http://MyTargetServer.domain.com:8080/PSDSCPullServer.svc/Module(C onfigurationId='a0a95372-66de-4937-896d-ac3489ab05d0',ModuleName='xNetworking',ModuleVersion='2.0')/ModuleContent.. Saving configuration instance into C:\Windows\System32\Configuration\DSCEngineCache.mof. Method MSFT_DSCLocalConfigurationManager_Invoke_PerformRequiredConfigurationChecks ended successfully |
Now, for whatever reason it doesn’t think it can find the xNetworking module to download it. I first want to double check my Pull Server Configuration.
1 2 3 4 5 6 7 8 9 10 11 12 |
xDscWebService PSDSCPullServer { Ensure = "Present" EndpointName = "PSDSCPullServer" Port = 8080 PhysicalPath = "$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer" CertificateThumbPrint = "AllowUnencryptedTraffic" ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules" ConfigurationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration" State = "Started" DependsOn = "[WindowsFeature]DSCServiceFeature" } |
The ModulePath is set above. I am certain I copied all the Module files into that directory, but I will double check. Nope, I am not crazy.
And just to check I open up the xNetworking.psd1 file and the very first line states that
# Version number of this module.
ModuleVersion = ‘2.0’
So that looks fine as well. At this point I am kind of stumped. I am not sure what the problem is. All the modules also exist in the C:\Program Files\WindowsPowerShell\Modules directory. While doing some playing around and looking at the Configurations for my Pull Server and DSCTest I am wondering where the name of the Download Manager comes in. I just used the Configuration in Don Jones DSC-Ebook, and it seems to have worked fine for him. But I am wondering if it needs to be something besides WebDownloadManager. The TechNet Article for Local Configuration Manager states that DownloadManagerName “Indicates the name of the Configuration and module download manager.” Well. That doesn’t really help me. I do some Google searching and see that same name, WebDownloadManager used a bunch, so it must the Default and be OK to use.
I did a bunch more searching and came across this article that talks about configuring Pull mode over SMB. In the update at the end it talks about how he needed to set folder permissions to access his share, so I think maybe that the can be the problem. I share out the C:\Program Files\WindowsPowerShell\DSCService\Modules folder to Everyone, giving them Full Control, and wait and see what happens.
If it checks in to Pull before I leave again today, I will update this post, otherwise I will continue tomorrow.
Update 4:24 PM. Still failing. Looking like I may have to try the DSCFileDownloadManager configuration tomorrow and see if I have any more luck.
Update 6:14 PM I figured out what was wrong. Reading further in the DSC E-Book, it talks about deploying custom resources. Apparently even the Microsoft released Resources, such as xNetworking, which do not come with the default DSC Configuration need their own checksum file. I created a .zip file named xNetworking_2.0.zip in the C:\Program Files\WindowsPowerShell\DSCService\Modules directory (from the extracted xNetworking folder in my modules directory). I then ran the New-DSCChecksum command against that file to create the checksum file. I then manually run the scheduled task on the DSCTTest server, and boom, configured!