Trouble Setting LCM for Partial Configurations

This topic contains 19 replies, has 7 voices, and was last updated by Profile photo of Jeremy Murrah Jeremy Murrah 1 year, 4 months ago.

  • Author
    Posts
  • #31221
    Profile photo of Hilton Giesenow
    Hilton Giesenow
    Participant

    Hi all,

    My first question on this site – please be nice 🙂

    I'm using WMF 5 Production Preview on Server 2012 R2, trying to set a node to use Partial Configurations. I've tried with a remote node and localhost, but all give an error. Sample config (I've tried a few variations, with more or less partial configs):

    [DSCLocalConfigurationManager()]
    configuration foo
    {

    Node localhost
    {

    PartialConfiguration SomeConfig
    {
    RefreshMode = 'Push'
    }
    }
    }

    foo -OutputPath $mofPath

    Set-DscLocalConfigurationManager -Path $mofPath

    But all I get is:

    The specified Property does not exist.
    + CategoryInfo : MetadataError: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 12
    + PSComputerName : localhost

    Now, strangely, it -sometimes- works on the first try, if I change the config, but never again, and even if the "first" try works, I can't actually apply configs. Running Publish-DscConfiguration gives the same error as above

  • #31933
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Have you tried this using a Pull server, vs. Push mode?

  • #31964
    Profile photo of Hilton Giesenow
    Hilton Giesenow
    Participant

    Hi Don,

    I did – I tried a couple of combos, push + pull, push, pull. I think I even tried 1 push + 2 pulls (http and smb). The example here is the simplest to repro

  • #31966
    Profile photo of Hilton Giesenow
    Hilton Giesenow
    Participant

    Would it help if I pasted a more complex/complete sample?

  • #31976
    Profile photo of Don Jones
    Don Jones
    Keymaster

    I've just never tried a partial push; do you have a simple pull that's causing the same problem?

  • #31979
    Profile photo of Hilton Giesenow
    Hilton Giesenow
    Participant

    Below is the full config I originally used, and gives the same behaviour. -Initially- it seems to work fine, but if I try push a config with 'Publish-DscConfiguration' then it gives the error. In addition, if I try Set-DscLocalConfigurationManager more than once with this config, only the first works, and then all subsequent attempts also give 'The specified Property does not exist'. So, another way to repro, is to use this config, then run 'Set-DscLocalConfigurationManager' two or more times – only the first will appear to work.

    Note that I've also tried switching the order of the pull and push modes (i.e. switching the DependsOn) to test other configurations – same result.

    [DSCLocalConfigurationManager()]
    configuration MyCompanyWebServer
    {
    param ([string]$ConfigurationID)

    Node Server01
    {
    Settings
    {
    ConfigurationID = $ConfigurationID
    RebootNodeIfNeeded = $true
    RefreshMode = "Pull"
    }

    PartialConfiguration BaseOSConfig
    {
    Description = 'Base OS Config'
    RefreshMode = 'Pull'
    ConfigurationSource = '[ConfigurationRepositoryWeb]MyCompanyHttpsPullServer'
    }

    PartialConfiguration SharePointConfig
    {
    RefreshMode = 'Push'
    DependsOn = '[PartialConfiguration]BaseOSConfig'
    }

    ConfigurationRepositoryWeb MyCompanyHttpsPullServer
    {
    ServerURL = 'https://MyPullServer.mydomain.local:8443/PSDSCPullServer.svc'
    AllowUnSecureConnection = $false
    }

    }
    }

  • #32006
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Just looking, I'm not seeing anything jump out as "wrong." I'm not sure how well-supported a mixed push/pull actually is, but I'm not in a position to try and duplicate this in a test environment (sorry). I'd consider bugging it on Connect since you've got a reproducible problem.

  • #32009
    Profile photo of Hilton Giesenow
    Hilton Giesenow
    Participant

    Thanks Don. At this point the sample is pretty much straight off msdn/technet. I've even tried with this:

    [DSCLocalConfigurationManager()]
    configuration MyCompanyWebServer
    {
    param ([string]$ConfigurationID)

    Node Server01
    {
    PartialConfiguration BaseOSConfig
    {
    Description = 'Base operating system configuration'
    RefreshMode = 'Push'

    }

    PartialConfiguration SharePointConfig
    {
    RefreshMode = 'Push'
    }
    }
    }

    With the same error. I logged it a while back on Connect, but no news.

    Incidentally, I've based the samples for now on these: http://blogs.msdn.com/b/powershell/archive/2015/07/08/validate-powershell-dsc-partial-configurations.aspx
    and
    https://msdn.microsoft.com/en-us/PowerShell/DSC/partialConfigs

  • #33219
    Profile photo of Hilton Giesenow
    Hilton Giesenow
    Participant

    I've tested this now with RTM and it still doesn't work, but the error message has changed. I now get
    No instance found with given property values.
    + CategoryInfo : InvalidArgument: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : HRESULT 0x8033801a
    + PSComputerName : localhost

  • #33222
    Profile photo of Zuldan
    Zuldan
    Participant

    Hilton, unfortunately DSC will break if you upgrade from Production Preview to RTM. You can fix DSC by doing the following. Fix is simple, see https://powershell.org/forums/topic/upgrading-from-wmf-5-production-preview-to-rtm-breaks-dsc/

  • #33234
    Profile photo of Hilton Giesenow
    Hilton Giesenow
    Participant

    Thanks Zuldan, that helped. Now I'm back to the original error, even running under RTM. I still can't figure out what's different – I'm testing such simple LCM settings, especially as compared to the MSDN / TechNet samples

  • #33590
    Profile photo of Yuriy Ostapenko
    Yuriy Ostapenko
    Participant

    I observe the same behavior here.
    First time it runs fine, second time I get this "The specified Property does not exist. / MI RESULT 12" using the most trivial partial configuration.

    Funny thing, if I comment out the partial config section and apply the config, first time I get the same error, but all following runs succeed.
    Uncomment it back, it will again succeed only the first time and then keep failing every time after.

  • #33594
    Profile photo of Hilton Giesenow
    Hilton Giesenow
    Participant

    Hi Yuriy,

    That's what I'm seeing too – it's like it's applying the previous configuration at first some times, then switches to the error.

  • #33596
    Profile photo of Yuriy Ostapenko
    Yuriy Ostapenko
    Participant

    Yep, I suspect something like that too

  • #33652
    Profile photo of Yuriy Ostapenko
    Yuriy Ostapenko
    Participant

    Here's what i'm trying to do:

    [DSCLocalConfigurationManager()]
    Configuration LocalDscConfig {
        param(
            [string[]]$nodes= @(
                "localhost"
            )
        )
    
        Node $nodes
        {
            Settings
            {
                RefreshMode             = 'Pull'
                RefreshFrequencyMins    = 30
                ConfigurationModeFrequencyMins = 15
                ConfigurationMode       = 'ApplyAndAutoCorrect'
                RebootNodeIfNeeded      = $true
                ActionAfterReboot       = 'ContinueConfiguration'
            }
            
            ConfigurationRepositoryWeb PullServer {
                ServerUrl = "https://dsc-pull.domain.local/PSDSCPullServer.svc"
                RegistrationKey = "***"
                ConfigurationNames = @("IisAspNet461")
            }
            
            PartialConfiguration BaseImage
            {
                Description = 'Configuration for the base image'
                ConfigurationSource = '[ConfigurationRepositoryWeb]PullServer'
                RefreshMode = 'Pull'
            }
        }
    }
    

    Symptoms:

    1. When this configuration is applied, first run returns success.
    2. If it is reapplied, it will keep failing with this:
      The specified Property does not exist.
          + CategoryInfo          : MetadataError: (root/Microsoft/...gurationManager:String) [], CimException
          + FullyQualifiedErrorId : MI RESULT 12
          + PSComputerName        : localhost
      
    3. If PartialConfiguration is removed or commented out, the first time it is applied you'll get the error as above.
    4. Subsequent applications will always succeed. And "Update-DscConfiguration -Verbose -Wait" will apply the configuration just fine after.
    5. When the configuration with PartialConfiguration present is applied, despite the "The specified Property does not exist." error, Get-DSCLocalConfigurationManager will return seemingly correct configuration.
    6. After this configuration is applied, "Update-DscConfiguration -Verbose -Wait" will return the same "The specified Property does not exist." error when run for the first time or after an idle period (5-10 mins?).
    7. When "Update-DscConfiguration -Verbose -Wait" is "warmed up", it will return another error instead:
      The Download Manager information is not available in the Local Configuration Manager settings.
          + CategoryInfo          : InvalidResult: (root/Microsoft/...gurationManager:String) [], CimException
          + FullyQualifiedErrorId : MetaConfigDownloadManagerInvalid
          + PSComputerName        : localhost
      

    I am observing this with both Windows 10 1511 and 2012R2 with WMF 5.0 RTM.

  • #33661
    Profile photo of Hilton Giesenow
    Hilton Giesenow
    Participant

    I've got a bug logged for this for the team at UserVoice, hoping it will get some visibility. Can you please upvote it: https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/11225886-bug-trouble-setting-lcm-for-partial-configuration

  • #35513
    Profile photo of Arie H
    Arie H
    Participant

    Based on a blog post mid last year by the PowerShell team, you cant use the RegistrationKeys method with partial configuration. You can only do it with the ConfigurationID a.k.a. GUID method (if you look at the examples in both cases you'll see that as well ).

    This might have changed to v5 RTM, though I haven't found something in the notes saying its not possible.

    As im trying to do something similar myself, ill update if I find anything.

    Take Care,

    Arie H.

  • #35782
    Profile photo of Jared Gohr
    Jared Gohr
    Participant

    After receiving the same error as noted above, I was able to successfully Set-DSCLocalConfigurationManager by manually deleting all mof files from the "C:\windows\system32\configuration" directory. (But not in the subdirs)

    Someone else might be able to confirm this as a fix.

  • #35783
    Profile photo of Don Jones
    Don Jones
    Keymaster

    "Workaround" for sure, not sure if it's a "fix" per se. Remove-DSCConfiguration is a more formal way of accomplishing that, making sure you tell it to remove all three.

  • #35834
    Profile photo of Jeremy Murrah
    Jeremy Murrah
    Participant

    Just wanted to bump this to say that this solved my issue with the "property does not exist" error on first run. In my case it was from machines that previously had PS v4 dsc configs on them, recently upgraded them to PS v5, and trying to push a v5 metaconfig to them.

    Worth noting that the Remove-DSCConfigurationDocument command didn't work, I had to go and manually delete the files in "c:\windows\system32\configuration"

You must be logged in to reply to this topic.