Did you know that you can add additional registry hives to your PowerShell drives? No? Then I will show you now how to do that and how to access HKCC with PowerShell. Let’s get started.
Determine PS Drives
Get-PSDrive display all built-in PowerShell Drives.
Some registry hives are missing here. Only HKCU and HKLM are present by default.
Add HKCC (HKey Current Config)
For adding additional drives, all we need to know is how to access them. In this example I use the registry:: statement to access HKCC to add it as a PowerShell drive.
New-PSDrive ` -Name HKCC ` -Root 'registry::HKEY_CURRENT_CONFIG' ` -PSProvider Registry
After all, it’s there and accessible.
Have fun accessing the values of the HKCC Hive via PowerShell!