Remove-RegistryKeyValue

Removes a value from a registry key, if it exists.

Syntax

Remove-RegistryKeyValue [-Path] <String> [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Description

If the given key doesn't exist, nothing happens.

Parameters

Name Type Description Required? Pipeline Input Default Value
Path String

The path to the registry key where the value should be removed.

true false
Name String

The name of the value to remove.

true false
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.

EXAMPLE 1

Remove-RegistryKeyValue -Path hklm:\Software\Carbon\Test -Name 'InstallPath'

Removes the InstallPath value from the hklm:\Software\Carbon\Test registry key.