Better output for DelRegKey()
This commit is contained in:
parent
c1d3c82c35
commit
47329ea298
1 changed files with 9 additions and 1 deletions
10
cleanW10.ps1
10
cleanW10.ps1
|
@ -276,7 +276,15 @@ function DelRegKey {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
Remove-ItemProperty -Path $params.path -Name $params.key
|
Get-ItemProperty -Path $params.path -Name $params.key
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host -ForegroundColor Yellow "key already deleted"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
|
||||||
|
#Remove-ItemProperty -Path $params.path -Name $params.key
|
||||||
Write-host -ForegroundColor Green "done"
|
Write-host -ForegroundColor Green "done"
|
||||||
}
|
}
|
||||||
catch [System.Security.SecurityException]{
|
catch [System.Security.SecurityException]{
|
||||||
|
|
Reference in a new issue