Add verbose logging for missing registry keys in Invoke-RegistryDeleteValueOperation

This commit is contained in:
Jeffrey
2026-05-17 23:43:35 +02:00
parent 9a375fdbc4
commit b0b4615718

View File

@@ -151,6 +151,9 @@ function Invoke-RegistryDeleteValueOperation {
) )
if ($null -eq $KeyInfo.Key) { if ($null -eq $KeyInfo.Key) {
$valueName = Get-NormalizedRegistryValueName -ValueName $Operation.ValueName
$displayValueName = if ([string]::IsNullOrEmpty($valueName)) { '(Default)' } else { $valueName }
Write-Verbose "Unable to find or open key '$($Operation.KeyPath)' and value '$displayValueName'"
return return
} }