For an outdated application, I need to create a registry key with the name in the format c:/foo/bar/baz . (Note: slashes, not backslashes). To be clear: this is one key name with a slash, which otherwise looks like a path to Windows. Since I need to script this against a large number of servers, PowerShell seems to be a great option.
The problem is that I cannot figure out how to create a key in this format through PowerShell. New-Item -Path HKLM:\SOFTWARE\Some\Key -Name 'c:/foo/bar/baz' errors using PowerShell I use / as a path separator and cannot find the path HKLM:\Software\Some\Key\c:\foo\bar , which really does not exist (and should not). I cannot find another way (ab) to use New-Item to get what I want.
Is there something that I am missing, or should I refuse and just generate and load the dump registry in the old-fashioned way?
Benjamin pollack
source share