Registry - PowerShell
List available registry drive
Get-PSDrive -PSProvider Registry
cd HKCU:
cd HKLM:
Using Registry provider
ls Registry::
cd Registry:: # Tab / Ctrl + Space
Alias:
ls
▶Get-ChildItem
Key
List keys
ls [<key path>]
Alias:
ls
▶Get-ChildItem
Create key
ni <key path>
Alias:
ni
▶New-Item
Delete key
ri <key path>
Alias:
ri
▶Remove-Item
Value
Get values
gp <key path> [-Name <name>]
Alias:
gp
▶Get-ItemProperty
Set value
sp <key path>
-Name <name>
-Value <value>
[-Type { Binary | DWord | QWord | ExpandString | MultiString | String }]
Alias:
sp
▶Set-ItemProperty
Remove value
rp <key path> -Name <name>
Alias:
rp
▶Remove-ItemProperty