-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DSC registry resource support '/' in the registry path. #285
Comments
Shouldn't the path be Edit: nevermind, just checked the code |
I was able to repro this using the |
Hi, This does not work for me in xPSDesiredStateConfiguration 5.1.0.0 on Win Server 2012R2. I get 128 as a separate subkey. $PSVersionTable
Edit: To add to this, it looks like New-RegistryKey functions uses Split-Path to create necessary keys. Split-Path will split on forward slash. |
Replaced usages of Split-Path in New-RegistryKey with String.LastIndexOf and String.Substring, splitting registry paths on backslash only.
Replaced usages of Split-Path in New-RegistryKey with String.LastIndexOf and String.Substring, splitting registry paths on backslash only.
Hi, I've submitted a pull request for this issue: #306 |
[#285] DSC - xRegistry support for '/' in key names
Fixed by #306 |
hi i was experiencing this issue and then arrived at this page from googling. has the fix been incorporated into the normal PSDesiredStateConfiguration resource yet? |
@ewhitesides We are no longer working on the PSDesiredStateConfiguration module, so this fix is not in those resources. Most PSDesiredStateConfiguration resources have been replaced by the ones in the open-source PSDscResources module which can be installed from the PowerShell Gallery. If you don't have WMF 5.1 yet, this fix is also in the xPSDesiredStateConfiguration module from the PowerShell Gallery. |
@kwirkykat - In that case, why haven't the Visual Studio 2017 templates been updated to use one of the modules with the fix in it? Seems odd that the VS templates are adding a deprecated module by default. |
We don't own those templates, but I've found the owner and I'm working with them to get the VS templates updated. Thanks for pointing that out! :) |
If you use a path containing a / e.g. "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 40/128" then the builtin registry resource you end up with an error or the wrong registry path being created.
This config will not work. I've have to create my own module to create the folder and then us the registry resource to create the actual key.
The register resource should support / in the path.
from uservoice: https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/17239322-dsc-registry-resource-support-in-the-registry
The text was updated successfully, but these errors were encountered: