Author Posts

September 20, 2016 at 2:45 pm

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, 10 months ago by  Amit Batham.

September 20, 2016 at 3:13 pm

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 }

September 20, 2016 at 3:23 pm

Thanks for reply.

I am not seeing any msiexec process running on client.

Is there anyway I can stop LCM on client ?

September 20, 2016 at 3:44 pm

You can try the following script with code borrowed from https://msdn.microsoft.com/PowerShell/DSC/troubleshooting

$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

September 20, 2016 at 6:05 pm

Hi,

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

September 20, 2016 at 6:09 pm

I would recommend using Remove-DscConfigurationDocument cmdlet instead.

Remove-DscConfigurationDocument -Stage Pending

September 21, 2016 at 7:50 am

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 ?

September 21, 2016 at 11:25 am

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: https://msdn.microsoft.com/en-us/powershell/dsc/troubleshooting

September 22, 2016 at 5:00 pm

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.