title: Creating a registry key with path components via PowerShell
body: <p>For a legacy application, I need to create a registry key with a name in the format <code>c:/foo/bar/baz</code>.  (Note: forward slashes, not backslashes.)  To be clear: that is a single key's name, with forward slashes, that otherwise looks like a Windows path.  Because I need to script this against lots of servers, PowerShell seems like a great option.</p>
  
  <p>The problem is that I cannot figure out how to create a key in that format via PowerShell.  <code>New-Item -Path HKLM:\SOFTWARE\Some\Key -Name 'c:/foo/bar/baz'</code> errors out with PowerShell thinking I'm using <code>/</code> as a path separator and failing to find the path <code>HKLM:\Software\Some\Key\c:\foo\bar</code>, which does indeed not exist (and shouldn't).  I can't find any other way to (ab)use <code>New-Item</code> to get what I want.</p>
  
  <p>Is there something I'm missing, or should I give up and just generate and load a registry dump the old-fashioned way?</p>