Problem with client pulling from PULL server

Hello all. I have 2012 R2 Server acting as Pull server and one client also running 2012 R2. Both have WMF5 and xPSPDesiredStateConfiguration and xDscDiagnostics modules.

I have been looking at this for about 12 hours solid and feel now I cannot resolve myself. It appears from all by searching for answers there is more than one way to accomplish the same thing in PSDSC. So without going into to much detail my Pull client is reporting:
Event ID 4104 - This event indicates that failure happens when LCM is trying to get the configuration from pull server using download manager WebDownLoad. Error is 0x4. ErrorDetail is The Configuration ID mof is not in a valid format. Please use a configuration with the name in a GUID Format.
On my Pull server under “c:\program files\windowspowershell\dscservice\configuration” I have 2 files. The file that has been renamed to GuidName.mof and the GuidName.Checksum.mof. I have one other folder titled “PullWebSite”. This folder is the configuration name in my script that I push down to the client, in that folder is a file called servername.domain.meta.mof, and that has the Pull server URL, The ConfigurationID where I have put the Guid.mof name. When I run this file (the script) and then do a Get-DscLocalConfigurationManager on the Pull client I know that it gets updated because the Guid being displayed matches that of the Guid.Mof.

So after 12 hours, numerous coffee’s and a blinding headache I am reaching out here for help. I have issues all the way which I struggled through and managed to resolve, and yet I cannot get around this latest problem. It appears the client is looking in the wrong place for the guid.mof and perhaps I just need advising of where? Any help much appreciated.
Thank you
Jay Lee

Can you share your LCM config? The one that you used to create the meta.mof?

Hi, thanks for responding. Here it is. My Pull server name is 2012srv03 and pull client is 2012srv06. On the bottom line of the script below. IT says “Set-DSCLocalConfigurationManager –ComputerName 2012srv06.domain.local -Path .\srv06website -Verbose”
Am I wrong here or does this bit not tell the Pull client to go grab its config file? I shouldn’t need to run Start-DscConfiguration (path to mof file) on the client itself should I? Isn’t that the point that the client picks up the config automatically? Anyhow, here is my script.

Configuration srv06website

Node 2012srv06.domain.local
ConfigurationMode = “ApplyandMonitor”
ConfigurationID = “39fa944f-f14b-44ed-8aa5-187c5fb87e63.mof”
RefreshMode = “Pull”
DownloadManagerName = ‘WebDownloadManager’
DownloadManagerCustomData = @{
ServerUrl = “https://2012srv03.domain.local:8080/PSDSCPullServer.svc”;
AllowUnsecureConnection = ‘false’ }
Set-DSCLocalConfigurationManager –ComputerName 2012srv06.domain.local -Path .\srv06website -Verbose

@Jason, You have a typo on the value of the ConfigurationID.
ConfigurationID = “39fa944f-f14b-44ed-8aa5-187c5fb87e63” # Please remove the *.mof extension.

Oh my god! Is that all it is? 2 days scratching my head. Let me go check, feel like a kid on Christmas morning. Back in a min…

Hi. So I took out the ‘mof’ extension. I then re-ran the script, got confirmation. I switch to my pull client and run Get-DscConfigurationManager. When I get the output I check the line that says “ConfigurationID”. Before making the change it has GuidHere,Mof. Now when I run it the output has removed the “.mof” extension leaving just the GUID. So here I’m thinking we have cracked it. So here is a question at this stage. That script I supplied should tell the Pull client to pull down the config, I shouldn’t have to do anything else on the client?

So now I run Get-DscConfiguration, here is the out put:

Get-DscConfiguration : Current configuration does not exist. Execute Start-DscConfiguration command with -Path
parameter to specify a configuration file and create a current configuration first.
At line:1 char:1
+ Get-DscConfiguration
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get
   -DscConfiguration], CimException
    + FullyQualifiedErrorId : MI RESULT 1,Get-DscConfiguration

So the same output as before. Should this now yield a result showing us the configuration I want to apply such as IIS?
Thanks all.

I have a question regarding folder structure on the PULL server and where the config files should be.
I run the script in PS from this folder: c:\program files\WindowsPowerShell\DscService\Cinfiguration
In the configuration folder I have 2 files, the GUID.mof and Checksum.mof.checksum

In that script posted the -Path bit is -Path .\srv06website . srv06website is a sub folder of the configuration folder above, and in that folder is a file called 2012srv06.domain.local.mof

Is this how the folder should be? Perhaps all 3 files should be in the same parent folder? It is this where I think the problem is but don’t know.
Thanks again

  • The default location for configuration repository of the pull is under
    'C:\Program Files\WindowsPowerShell\DscService\Configuration'

  • Default module repository is under
    'C:\Program Files\WindowsPowerShell\DscService\Modules'

  • There is PowerShell module in PS Gallery that you can use to publish modules and configurations to the pull server.

# Install XPSDesiredStateCofiguration module.
Install-Module XPSDesiredstateconfiguration

Configuration Test
        File fl{
        DestinationPath =  "$env:TEMP\test.txt"
        Contents = "Test"
Test -OutputPath .\
Get-ChildItem .\*.mof | Publish-MOFToPullServer   # publish all your mofs from some path to pullserver.
Get-Module xWebSite | Publish-ModuleToPullServer  # publish module to pull server.

The Error that you are seeing from Get-DscConfiguration is because no configuration has been applied on the node yet. Please wait for current value of ‘RefreshFrequencyMins’ before the client node pulls its new configuration from the server. If you want the node to pull its configuration right away you can use ‘Update-DSCConfiguration’

Actually I just noticed my default OS for the file servers is nano - I bet that changing that to 2012r2 (where it works in my other template) will fix. Talking to myself here right now but I’ll still follow up.