Use Remove-Item to actually delete a registry key:
function Remove-RegistryKey($key) {
Remove-Item $key -Force
}
Remove-Item $key -Force
}
Use Remove-ItemProperty to delete a registry value:
function Remove-RegistryValue($key, $value) {
Remove-ItemProperty $key $value
}
Remove-ItemProperty $key $value
}