Start-DscConfiguration Hangs

Hey All,

I’m piloting use of DSC and am encountering a problem in my testing. Specifically, most recently I have been testing implementing Package resources in a Configuration script and applying them locally using the localhost node to a test system. What I’ve noticed is that if there is an issue with, for example, the Arguments supplied to a java installation executable (see example below); the MOF will be created without issue and the Start-DscConfiguration will run however it will never complete…it just hangs there. And if I terminate the PowerShell console, and reboot the server, any attempt to execute Start-DscConfiguration returns a message indicating that a configuration is in progress. This results in me having to rollback to a snapshot of the virtual test system (effectively a rebuild scenario in a environment without a snapshot) to get back to a state where I can continue testing. Has anyone encountered this with DSC and has an alternative solution to the awkward one I’m using?

    Package JavaJDKu51
        Ensure = "Present"
        Path = "$InstallFolder\Packages\jdk-7u51-windows-x64.exe"
        Name = "Java SE Development Kit 7 Update 51 (64-bit)"
        ProductID = "64A3A4F4-B792-11D6-A78A-00B0D0170510"
        Arguments = "/S ADDLOCAL='ToolsFeature,PublicjreFeature'"

As an aside question…you can see in the Arguments statement above that the package expects a quoted string, is there a better way to provide the quotes within the Arguments quoted string?

Thanks much & happy scripting.

Partial resolution - It looks like if I use a combination of -force and restarting the system I can get back to a condition where start-DscConfiguration does not fail with the message indicated. Note that the -force qualifier will not consistently resolve the condition.

I’m having the same problem on Win 2016 Datacenter. It hangs after:

Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManage
r,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'. 

A restart and -force didn’t fix this. My main question is, how do I even begin to debug this? I don’t know where to look, where can I find more details about what’s going on inside? Or, how can I cause more detailed logging so as to find the cause?

Here’s my config:

Configuration WinSSHConfig 
 Import-DscResource –ModuleName 'PSDesiredStateConfiguration'
    Node "localhost" 
        Package BitVise 
            Name = "BitVise"
            Path = Join-Path $PSScriptRoot "\BvSshServer-Inst.exe"
            ProductId = "" # Might help to add this later
            Ensure = "Present"
            # "Specified logpath could nto be opened" LogPath = "C:\Users\ops\Desktop\AllWindows"



It’s hanging again when trying to stop the operation when I restart and use the -force flag:

VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
VERBOSE: An LCM method call arrived from computer DOWNLOADSCRIPT with user sid
VERBOSE: The -Force option was specified with the Stop operation. The current configuration has been successfully

It only hangs with the

flag. So this tells me that for some reason the
“Invoke CimMethod”

with parameter
“MethodName” = “SendConfigurationApply”
never finishes executing, and the wait flag waits forever for it to finish.

Any ideas what might cause the


to never finish?