From 77cdf5422e4f298c60903cb73f1b1cde5ff62c45 Mon Sep 17 00:00:00 2001 From: poslop Date: Thu, 15 Jan 2026 15:48:57 -0600 Subject: [PATCH] log sid and profilePath --- RemoveHKeyPrinters/RemoveHKeyPrinters.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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