LCM configuration via pending mof

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Tony Ward Tony Ward 4 months ago.

  • Author
    Posts
  • #49238
    Profile photo of Tony Ward
    Tony Ward
    Participant

    Is there a method to change the configuration of the LCM using a pending.mof?

    We currently configure new VMs with a scheduled task to run a script that will configure the LCM with properties provided during the deployment. This method obviously works but I have wondered if there is another more elegant method to configure the LCM using DSC itself?

  • #49247
    Profile photo of Daniel Krebs
    Daniel Krebs
    Participant

    Hi Tony,

    I'm assuming to want to configure your nodes to get the configuration from a pull server. Try to inject a valid MetaConfig.mof into the C:\Windows\System32\Configuration directory. The pending.mof cannot be used to configure the LCM as far as I know.

    Please be aware that I don't know if injecting a MetaConfig.mof file is supported or would work as expected. It would probably best to reach out to the PowerShell team via Twitter (https://twitter.com/PowerShell_Team).

    Cheers
    Daniel

  • #49303
    Profile photo of Tony Ward
    Tony Ward
    Participant

    Hi Daniel,
    Thanks for the response. Ill follow up that lead and post back here.

    As for the meta mof injection. I'm sure we have tested that scenario and it does work with some modifications to the meta.mof but as you say it may not be a supported method.
    Our scenario requires that before we configure the LCM we execute some code to extract some embedded data from the VM about its configuration. Its host name for instance. That data informs the code with how to configure the LCM. It would have been nice to use a pending mof that sits there waiting to be triggered.
    This also makes it difficult for us to use partial configurations when configuring the LCM. We cannot use one big PUSH LCM config script for all deployments. we want to be selective where LCM configurations are applied and pull LCM configs based on the VM environment.

    Anyway we will keep investigating other ways to exploit the technology.

    Cheers

You must be logged in to reply to this topic.