Is DSC Debug mode on or off?

Welcome Forums DSC (Desired State Configuration) Is DSC Debug mode on or off?

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

2 years, 11 months ago.

  • Author
  • #34081

    Points: 0
    Rank: Member

    Hi all, I've come across something strange (well to me anyway). Is DSC debug on or off?

    This event appears:

    Source: Microsoft-Windows-DSC
    Date: 20/01/2016 5:01:33 p.m.
    Event ID: 4257
    Task Category: None
    Level: Information
    User: SYSTEM
    Computer: LABSERVER01.lab.local
    Job {C2CAE6AC-BF27-11E5-80CA-005056B61AD8} :
    Job runs under the following LCM setting.
    ConfigurationMode: ApplyAndAutoCorrect
    ConfigurationModeFrequencyMins: 30
    RefreshMode: Pull
    RefreshFrequencyMins: 60
    RebootNodeIfNeeded: None
    DebugMode: True

    But DSC config managers debug mode is set to None.

    PS C:\> Get-DscLocalConfigurationManager

    ActionAfterReboot : ContinueConfiguration
    AgentId : 9439A08F-B420-11E5-80C5-005056B61AD8
    AllowModuleOverWrite : True
    CertificateID : A53F41C9380B513E3EA5D472FCAF9998E75ED9BD
    ConfigurationDownloadManagers : {[ConfigurationRepositoryWeb]DSCHTTP}
    ConfigurationID : fb5b42e2-fb92-48ab-9eb0-d106495d293d
    ConfigurationMode : ApplyAndAutoCorrect
    ConfigurationModeFrequencyMins : 30
    Credential :
    DebugMode : {None}
    DownloadManagerCustomData :
    DownloadManagerName :
    LCMCompatibleVersions : {1.0, 2.0}

    PS C:\> $PSVersionTable

    Name Value
    —- —–
    PSVersion 5.0.10586.51
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.10586.51
    CLRVersion 4.0.30319.34014
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3

  • #34141

    Points: 1,759
    Helping HandTeam Member
    Rank: Community Hero

    Try explicitly setting the LCM to False. Does that change anything?

  • #34160

    Points: 0
    Rank: Member

    No luck Don.

    PSDesiredStateConfiguration\Node : At least one of the values 'False' is not supported or valid for property 'DebugMode' on class 'Settings'. Please specify only supported values:
    None, ForceModuleImport, All.

    Every single production server showing as Debug is enabled in Event Logs. I wouldn't be surprised if other people have it too but just haven't noticed.
    I wonder if this is some sort of RTM 5 bug?

  • #34162

    Points: 1,759
    Helping HandTeam Member
    Rank: Community Hero

    "Bug" is a strong word. Worth filing on UserVoice, though.

  • #34223

    Points: 0
    Rank: Member

    Thanks Don. You're right, it may not be a bug. Could be something in my environment or something I'm doing wrong.–bug-ps5-rtm-debug-status

  • #34316

    Points: 0
    Rank: Member

    I can confirm my WMF4 lab shows the same behavior. Nodes say debug is $true while the LCM query says none.

    I initially thought it might be like a GPO where "none" meant undefined as opposed to true false but here, as well, it seems to be an explicit variable.

    That said, I believe debug mode usually disables caching so you can easily tweak/test modules yet the behavior is clear (at least in my lab) that the modules are cached. I have a feeling it may be a simple reporting bug to the event log while the service behaves properly.

  • #34323

    Points: 0
    Rank: Member

    Justin thanks for your post. Interesting to see that this occurs in PS4 as well. If you can remember the steps to reproduce this please could you post them on–bug-ps5-rtm-debug-status. Microsoft are asking for reproduction steps and I'll only have access to the lab environment in 2 weeks due to me being on leave.

  • #34591

    Points: 0
    Rank: Member

    I posted my feedback on your report as well. From what I can ell it's one of two things:

    1. A simple eventlog bug where the posted log isn't accurately reporting debug status. From what I can tell DSC is behaving properly when you toggle it.

    2. We are misunderstanding of what's being reported. Possibly it's reporting if debug features are installed and ready vs what mode it is in (True/False are not even valid values in the list of none/forcemoduleimport/all)

  • #34706

    Points: 0
    Rank: Member

    Thanks for posting the feedback Justin. We'll have to wait and see what MS have to say about it.

The topic ‘Is DSC Debug mode on or off?’ is closed to new replies.