Ask Your Question

Puppet with DSC, adding registry Key

asked 2016-07-28 08:44:10 -0600

wilsonjc82 gravatar image

Hi All. We are attempting to add registry keys to our windows estate using puppet.

We have tow that need adding one works the other doesn't

the one that fails is
dscregistry {'Schannelcyphers56': dscensure => 'Present', dsckey => 'HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\DES 56/56', dscvaluename => 'Enabled', dscvaluedata => '0', dscvaluetype => 'Dword', }

and we have narrowed it down to the forward slash (/) but we can't find a way to add this via puppet..

We can add it manually.

Any ideas?

thanks in advance

edit retag flag offensive close merge delete


Have you tried using the DSC resource directly. It may well be that Puppet is creating a create DSC resource statement but the underlying DSC code is broken.

GlennSarti gravatar imageGlennSarti ( 2016-08-02 12:24:51 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-08-04 02:56:09 -0600

wilsonjc82 gravatar image

Thanks GlennSarti.

It appears that Powershell really struggles with forward slashes in registry keys. most of the normal ways of escaping the character don't work.

The way around it I found was to create a script and get puppet to execute the script, which looks something like

new-item -path ''HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\' $key = (get-item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\", $true) $key.CreateSubKey('Ciphers\DES 56/56') $key.Close()

And then add the values under there as normal.

Hope this helps someone :)


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-07-28 08:44:10 -0600

Seen: 234 times

Last updated: Aug 04 '16