Stop-Dsc configuration which is running/stuck

This topic contains 8 replies, has 4 voices, and was last updated by  Nitin Gupta 1 year, 9 months ago.

  • Author
  • #54317

    Amit Batham

    Hello Team,

    I am a newbie to DSC

    I made a push server & created a script to install the softwares on client. It worked fine when i pushed 3 softwares but not added "Adobe Acrobat" as well to push in same script. Script never finished .. looks like hung. I used CTRL+Break but if i check Get-dsclocalconfgurationmanager .. status is Busy & I can't run the script again.. tried stopping it remotely using below command but it keeps running/executing... Please help

    Stop-DscConfiguration -Force -CimSession servername

    • This topic was modified 1 year, 9 months ago by  Amit Batham.
  • #54319

    Daniel Krebs

    Have you tried to kill the Adobe Acrobat installation process (probably an msiexec process) remotely via Invoke-Command?

    Invoke-Command -ComputerName lon6utinfint26 -ScriptBlock { Get-Process -Name msiexec | Stop-Process -Force }

  • #54320

    Amit Batham

    Thanks for reply.

    I am not seeing any msiexec process running on client.

    Is there anyway I can stop LCM on client ?

  • #54321

    Daniel Krebs

    You can try the following script with code borrowed from

    $ScriptBlock = {
        $dscProcessID = Get-WmiObject msft_providers | 
            Where-Object { $_.provider -like 'dsccore' } | 
                Select-Object -ExpandProperty HostProcessIdentifier 
        Get-Process -Id $dscProcessID | Stop-Process
    Invoke-Command -ComputerName lon6utinfint26 -ScriptBlock $ScriptBlock
  • #54333

    Arie H


    On the node, go to C:\windows\system32\configuration
    and remove the pending.mof

  • #54335

    Nitin Gupta

    I would recommend using Remove-DscConfigurationDocument cmdlet instead.

    Remove-DscConfigurationDocument -Stage Pending
  • #54379

    Amit Batham

    Hello Daniel,

    I ran your script , it completed & asked mt stop WmiPervSE process & I did. But when i checked dsclocalconfigmanager after that, still state is showing Busy.

    ActionAfterReboot : ContinueConfiguration
    AllowModuleOverWrite : False
    CertificateID :
    ConfigurationDownloadManagers : {}
    ConfigurationID :
    ConfigurationMode : ApplyAndMonitor
    ConfigurationModeFrequencyMins : 15
    Credential :
    DebugMode : {NONE}
    DownloadManagerCustomData :
    DownloadManagerName :
    LCMCompatibleVersions : {1.0, 2.0}
    LCMState : Busy
    LCMStateDetail : LCM is performing a consistency check.
    LCMVersion : 2.0
    StatusRetentionTimeInDays : 10
    PartialConfigurations :
    RebootNodeIfNeeded : False
    RefreshFrequencyMins : 30
    RefreshMode : PUSH
    ReportManagers : {}
    ResourceModuleManagers : {}

    How can I find the Pull/Push server name from client directly ?

  • #54382

    Daniel Krebs

    You'll probably need to restart the machine. It looks like from your post that a pull server is not configured. To determine the origin of the previous configuration push you can look into the DSC event log or open the pending.mof on the target node to check where the configuration was generated which is less reliable. More information here:

  • #54455

    Nitin Gupta

    If DSC is running consistency check and if LCM crashes, DSC will try to recover from the crash by running the consistency check again almost immediately. You need the combination of removing documents and killing the process.
    1) Remove Pending and Current Stage using Remove-DscConfigurationDocument cmdlet
    2) Kill the process as Daniel suggested.
    3) Wait for 1-2 mins for DSC to recover from the crash.

You must be logged in to reply to this topic.