Disable Local Configuration Manager During Deployment Process

Hey All,

We use PowerShelll DSC in our environment and we have set the LCM to “ApplyAndAutoCorrect”. Part of the DSC we make sure for example services are running and etc, during Octopus Deployment is there a way to stop the LCM in order for the deployment process goes unscathed? Then last step in Octopus enable the LCM.


Not really. The LCM, especially in AutoCorrect mode, isn’t intended to “pause.”

Are you wanting it to just wait until some other process is complete?


use RefreshMode = Disabled

although as don would have said, in other words, think if you’re using DSC for what it was meant to do
and not bending it to do what you want it to do.

By default RefreshMode is set to Push, so unless you push anything to it, it will not interfere with octopus deploy.
The reason ‘Disable’ was introduced is because LCM would interfere with chef and puppet that have a client installed on the node.

So think if you really want an external deployment tool to configure LCM, or perhaps you should change the application your deploying via OD and split it to two parts that live separately.

Setting the refresh mode while the LCM is running won’t do anything, though - did I misunderstand, then? I thought you were looking to have the LCM stop mid-configuration and wait for something to complete? Or are you just looking to have Octopus start the LCM, and not have the LCM run automatically?

Thank you all for your replies. Looks like it is something that can’t be done. Quite looking for during deployment process to have LCM paused. As part of the DSC configuration I have NXLog service running, I have specified for the service to always set as running. During a release NXLog service has to be stopped, I don’t want during the deployment process the NXLog starting back up.

Hence why I was wondering if there was way to pause the LCM and have the pause and unpause as part of the deployment process.

@Viral: Define “During a release” and how it related to DSC ?
as I understand you have a node that has a DSC script to make sure a service is enabled
Yes there are time when you run a ‘Release’ process where that service needs to be disabled for the duration of that process
and as such the LCM interferes with your process.

@Don: “Setting the refresh mode while the LCM is running won’t do anything” - Are you sure about this ?
I see this as a toggle switch.

As part of the Release process, send a meta script with RefreshMode = Disabled
you can add a step to verify that the LCMState is disabled and then continue your process.
When the process ends, send a meta script with RefreshMode set to what ever you had before.

I have a feeling setting it to Push would have similar results but never tested it.

What I mean by “release” is code release, being web servers new code release. We use Octopus Deploy to deploy code releases. PowerShell DSC is used to make sure the the server is configured to the correct configuration IIS features installed to software installed. Also checking services are running.

Please add your vote for this scenario: