-
Notifications
You must be signed in to change notification settings - Fork 205
dsc_registry generates InDesiredState = $false which forces to set entries on every puppet run #203
Comments
@marcinbojko We can't fix in-box resources (from PSDesiredStateConfiguration) here in the DSC Resource Kit, but I can at least let the team know about this bug so they can investigate. To me this looks like a bug we had previously where the registry value being set to 0 with the binary data type caused the resource to think that it's value was actually null and not 0. I'm not sure if you can change the DSC resource or module being called since it looks like you are using Puppet, but this is confirmed fixed in the xRegistry resource in the xPSDesiredStateConfiguration module (which is part of the DSC Resource Kit). |
@kwirkykat - Thanks for the update. About DSC resource - I will ask people from Puppet. |
@marcinbojko @kwirkykat Is this issue specific to setting the value through puppet run or when value data is set to 0 or this specific example? I couldn't repro it for the following example:
Invoke-DscResource -Name Registry -Method Test -ModuleName PSDesiredStateConfiguration -Property @{Key = 'HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds'; ValueName = 'ConsolePrompting'; ValueData = @('True')}
InDesiredState
--------------
False
Invoke-DscResource -Name Registry -Method Set -ModuleName PSDesiredStateConfiguration -Property @{Key = 'HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds'; ValueName = 'ConsolePrompting'; ValueData = @('True')}
RebootRequired
--------------
False
Invoke-DscResource -Name Registry -Method Test -ModuleName PSDesiredStateConfiguration -Property @{Key = 'HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds'; ValueName = 'ConsolePrompting'; ValueData = @('True')}
InDesiredState
--------------
True PowerShell Version used to test $PSVersionTable
Name Value
---- -----
PSVersion 5.1.14393.187
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.187
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1 Can you open a uservoice issue for the same, if not already done? |
@HemantMahawar
And no, 0 values was changed by me from real password. And it doesn't matter if its zero or other value. |
|
@kwirkykat @HemantMahawar |
May I ask why? |
@marcinbojko This bug is external to the DSC Resource Kit since it deals with a built-in DSC resource and not one of the ones contained here. The closest resource we have here in the Kit (xRegistry) does not have this bug. I left this issue open while you guys were still discussing it, but it is ultimately not a bug for the DSC Resource Kit. |
I'll switch to xRegistry then, thanks @kwirkykat for leaving it open. |
@kwirkykat - closing this issue, since it seems to be connected with specific sets of modules. |
Setting any value in registry returns notify every time puppet agent launches. Dsc_registry returns " InDesiredState = $false" despite values being written correctly.
use dsc_registry with values above.
The text was updated successfully, but these errors were encountered: