log sid and profilePath

This commit is contained in:
poslop
2026-01-15 15:48:57 -06:00
parent 42c7892125
commit 77cdf5422e

View File

@@ -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