Registry roots
| Drive | Root |
|---|---|
HKCU:\ | Registry::HKEY_CURRENT_USER\ |
HKLM:\ | Registry::HKEY_LOCAL_MACHINE\ |
HKCR:\¹⁾ | Registry::HKEY_CLASSES_ROOT\ |
¹⁾: provide HKCR: drive
New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCRModify keys
The registry consist out of nested keys and their entries.
List entries
$key = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion"
Get-ItemProperty -Path $keyGet entry
$key = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion"
Get-ItemProperty -Path $key -Name DevicePathWrite entry
$key = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion"
"test" | Set-ItemProperty -Path $key -Name DevicePath -Value $_Sources:
Related:
Tags: Windows