mattifestation/CimSweep

Proposed removal of -Path from Get-CSRegistryKey and Get-CSRegistryValue

mattifestation opened this issue · 2 comments

The -Path parameter is redundant as -Hive and -Subkey already exist. My logic in including -Path was primarily for local testing where I was afforded tab completion with registry PSDrive paths - HKCU:\ and HKLM:. This can potentially cause two issues from a usability standpoint:

  1. StdRegProv supports HKLM, HKCU, HKU, HKCR, and HKCC. HKU, HKCR, and HKCC don't exist as PSDrives by default so I don't want to have to force users to call New-PSDrive just to use those hives.
  2. Tab completion with -Path is nice but it provides a false sense of security in that while tab completion implies that the registry key exists on the local machine, it doesn't imply it's existent in a remote CIM session.

Unless there are any objections, I'm going to remove -Path in the next release. Speak now, or forever hold your peace. :)

Thanks to @alexandair for forcing me to think so critically of what's necessary. :)

Removed.