PowerShell Logo Small

Remove-ItemProperty



This is the built-in help made by Microsoft for the command 'Remove-ItemProperty', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Deletes the property and its value from an item.

SYNTAX


Remove-ItemProperty [-Path] <String[]> [-Name] <String[]> [-Credential [<PSCredential>]] [-Exclude [<String[]>]] [-Filter [<String>]] [-Force] [-Include [<String[]>]]
[-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-Confirm] [-WhatIf] [-UseTransaction
[<SwitchParameter>]] [<CommonParameters>]
Remove-ItemProperty [-Name] <String[]> [-Credential [<PSCredential>]] [-Exclude [<String[]>]] [-Filter [<String>]] [-Force] [-Include [<String[]>]] [-InformationAction
{SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] -LiteralPath <String[]> [-Confirm] [-WhatIf] [-UseTransaction
[<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-ItemProperty cmdlet deletes a property and its value from an item. You can use it to delete registry values and the data that they store.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=293897
Clear-ItemProperty
Copy-ItemProperty
Get-ItemProperty
Move-ItemProperty
New-ItemProperty
Remove-Item
Rename-ItemProperty
Set-ItemProperty
about_Providers

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>remove-itemproperty -path HKLM:\Software\SmpApplication -name SmpProperty



This command deletes the SmpProperty registry value, and its data, from the SmpApplication subkey of the HKEY_LOCAL_MACHINE\Software registry key.

Because the command is issued from a file system drive (PS C:\>), it includes the fully qualified path to the SmpApplication subkey, including the drive, HKLM:, and the
Software key.

It uses the Name parameter to identify the registry value that is being deleted.










-------------------------- EXAMPLE 2 --------------------------

PS C:\>set-location HKCU:\Software\MyCompany\MyApp
PS HKCU:\Software\MyCompany\MyApp> remove-itemproperty -path . -Name Options -confirm



These commands delete the Options registry value, and its data, from the MyApp subkey of HKEY_CURRENT_USER\Software\MyCompany.

The first command uses the Set-Location cmdlet to change the current location to the HKEY_CURRENT_USER drive (HKCU:) and the Software\MyCompany\MyApp subkey.

The second command uses the Remove-Item cmdlet to remove the Options registry value, and its data, from the MyApp subkey. Because the Path parameter is required, the command
uses a dot (.) to indicate the current location. It uses the Name parameter to specify which registry value to delete. It uses the Confirm parameter to request a user prompt
before deleting the value.










-------------------------- EXAMPLE 3 --------------------------

PS C:\>get-item -path HKLM:\Software\MyCompany | remove-itemproperty -name NoOfEmployees



This command deletes the NoOfEmployees registry value, and its data, from the HKLM\Software\MyCompany registry key.

The command uses the Get-Item cmdlet to get an item that represents the registry key. It uses a pipeline operator (|) to send the object to the Remove-ItemProperty cmdlet.
Then, it uses the Name parameter of Remove-ItemProperty to specify the name of the registry value.