Remove Registry Keys and Values

by Dec 2, 2009

Use Remove-Item to actually delete a registry key:

function Remove-RegistryKey($key) {
Remove-Item $key -Force
}

Use Remove-ItemProperty to delete a registry value:

function Remove-RegistryValue($key, $value) {
Remove-ItemProperty $key $value
}

Twitter This Tip! ReTweet this Tip!