Add warning when path was not found using Remove-ItemPropertyVerified

main
LeDragoX 4 months ago committed by Plínio Larrubia
parent 527483ff6b
commit f057456541
No known key found for this signature in database
GPG Key ID: 057B0A87CB137C69

@ -20,6 +20,7 @@ function Remove-ItemPropertyVerified() {
}
Process {
If (Test-Path "$Path") {
If ((Get-Item -Path "$Path").Property -ccontains $Name) {
Write-Status -Types "-", $TweakType -Status "Removing: `"$Path>$Name`""
@ -63,6 +64,10 @@ function Remove-ItemPropertyVerified() {
Invoke-Expression "$ScriptBlock"
} Else {
Write-Status -Types "?", $TweakType -Status "The property `"$Path>$Name`" does not exist." -Warning
}
} Else {
Write-Status -Types "?", $TweakType -Status "The path(s) `"$Path`" to the property `"$Name`" couldn't be found." -Warning
}
}
}

Loading…
Cancel
Save