Skip to main content

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: lsGet-ChildItem

Key

Ref: Working with Registry Keys

List keys

ls [<key path>]

Alias: lsGet-ChildItem

Create key

ni <key path>

Alias: niNew-Item

Delete key

ri <key path>

Alias: riRemove-Item

Value

Ref: Working with Registry Entries

Get values

gp <key path> [-Name <name>]

Alias: gpGet-ItemProperty

Set value

sp <key path>
-Name <name>
-Value <value>
[-Type { Binary | DWord | QWord | ExpandString | MultiString | String }]

Alias: spSet-ItemProperty

Remove value

rp <key path> -Name <name>

Alias: rpRemove-ItemProperty