diff --git a/RemoveHKeyPrinters/RemoveHKeyPrinters.ps1 b/RemoveHKeyPrinters/RemoveHKeyPrinters.ps1 index 08cbd5f..1f85302 100644 --- a/RemoveHKeyPrinters/RemoveHKeyPrinters.ps1 +++ b/RemoveHKeyPrinters/RemoveHKeyPrinters.ps1 @@ -35,7 +35,6 @@ foreach ($HKLMPrinterPaths in $HKLMPrinterPaths) { Remove-Item -Path "Registry::${HKLMPrinterPaths}" -Recurse -Force -ErrorAction Stop Write-Host "Removed local machine key ${HKLMPrinterPaths}" -ForegroundColor Green } catch { - Write-Host "Error: $($_.Exception.Message)" } } @@ -48,7 +47,6 @@ foreach ($sidItem in $sids) { Remove-Item -Path "Registry::HKEY_USERS\${sid}${HKUsersPrinterPath}" -Recurse -Force -ErrorAction Stop Write-Host "Removed user profile key HKEY_USERS\${sid}${HKUsersPrinterPath}" -ForegroundColor Green } catch { - Write-Host "Error: $($_.Exception.Message)" } } }