diff --git a/RemoveHKeyPrinters/RemoveHKeyPrinters.ps1 b/RemoveHKeyPrinters/RemoveHKeyPrinters.ps1 index 82eafae..51cf067 100644 --- a/RemoveHKeyPrinters/RemoveHKeyPrinters.ps1 +++ b/RemoveHKeyPrinters/RemoveHKeyPrinters.ps1 @@ -41,7 +41,10 @@ foreach ($HKLMPrinterPaths in $HKLMPrinterPaths) { foreach ($sidItem in $sids) { $sid = $sidItem.PSChildName $profilePath = (Get-ItemProperty -Path $sidItem.PSPath -Name ProfileImagePath).ProfileImagePath - + + Write-Host "$sid" -ForegroundColor Blue + Write-Host "$profilePath" -ForegroundColor Blue + foreach ($HKUsersPrinterPath in $HKUsersPrinterPaths) { try { Remove-Item -Path "Registry::HKEY_USERS\${sid}${HKUsersPrinterPath}" -Recurse -Force -ErrorAction Stop