log sid and profilePath
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user