Stop-Dsc configuration which is running/stuck

Welcome Forums DSC (Desired State Configuration) Stop-Dsc configuration which is running/stuck

This topic contains 8 replies, has 4 voices, and was last updated by

2 years, 7 months ago.

  • Author
  • #54317

    Points: 0
    Rank: Member

    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

  • #54319

    Points: 24
    Team Member
    Rank: Member

    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

    Points: 0
    Rank: Member

    Thanks for reply.

    I am not seeing any msiexec process running on client.

    Is there anyway I can stop LCM on client ?

  • #54321

    Points: 24
    Team Member
    Rank: Member

    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

    Points: -19
    Rank: Member


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

  • #54335

    Points: 0
    Rank: Member

    I would recommend using Remove-DscConfigurationDocument cmdlet instead.

    Remove-DscConfigurationDocument -Stage Pending
  • #54379

    Points: 0
    Rank: Member

    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

    Points: 24
    Team Member
    Rank: Member

    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

    Points: 0
    Rank: Member

    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.

The topic ‘Stop-Dsc configuration which is running/stuck’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort