24/7/365 Support

Modify or Remove a Registry Key Value

Problem

You want to modify or remove a property of a specific registry key.

Solution

To set the value of a registry key, use the SetItemProperty cmdlet:

PS >(GetItemProperty .).MyProgram c:\temp\MyProgram.exe PS >SetItemProperty . MyProgram d:\Lee\tools\MyProgram.exe PS >(GetItemProperty .).MyProgram d:\Lee\tools\MyProgram.exe

To remove the value of a registry key, use the RemoveItemProperty cmdlet:

PS >RemoveItemProperty . MyProgram PS >(GetItemProperty .).MyProgram

Discussion

In the registry provider, PowerShell treats registry keys as items and key values as properties of those items. To change the value of a key property, use the SetItemProperty cmdlet. The SetItemProperty cmdlet has the standard alias, sp.To remove a key property altogether, use the RemoveItemProperty cmdlet.

As always, use caution when changing information in the registry. Deleting or changing the wrong item can easily render your system unbootable.

For more information about the GetItemProperty cmdlet, type GetHelp GetItemProperty. For information about the SetItemProperty and RemoveItemProperty cmdlets, type GetHelp SetItemProperty or GetHelp RemoveItemProperty, respectively. For more information about the registry provider, type GetHelp Registry.

Help Category:

Get Windows Dedicated Server

Only reading will not help you, you have to practice it! So get it now.

Processor RAM Storage Server Detail
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 128 GB (SSD SATA) Configure Server
Intel Atom C2750 2.4 GHz 8c/8t 8 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Xeon E3-1230 v2 3.3 GHz 4c/8t 16 GB DDR3 1× 256 GB (SSD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 250 GB (SSD SATA) Configure Server

What Our Clients Say