현재 설치 되어 있는 드라이브 보기
Get-PrinterDriver | Format-List Name
이 명령어로 하면 없던 개 설치 되어 버림 -_-;;
Get-Printer | Select-Object Name
이걸로 해야 하는 것 같다.
성공 https://pureinfotech.com/remove-printer-driver-windows-10/
https://www.action1.com/how-to-install-and-remove-printer-with-powershell-on-windows/
# "드라이브 지우기"
Get-PrinterDriver | Format-List Name | Out-File -Encoding OEM "$env:temp\test.txt"
Get-Content "$env:temp\test.txt" -Encoding OEM | ForEach-Object { $_ -replace "Name : ", "" } | Set-Content "$env:temp\777.txt" -Encoding OEM
# 빈줄 제거 성공 휴.. https://cafe.daum.net/candan/GGFN/386 https://www.quora.com/How-do-I-remove-blank-lines-from-a-CSV-file-using-PowerShell 적어 놔서 살았다 ㅠ.
Get-Content $env:temp\777.txt | Where { $_.Replace(",","") -ne "" } | Out-File $env:temp\888.txt
Get-Content $env:temp\777.txt | Where { $_.Replace(",","") -ne "" } | Out-File $env:temp\888.txt -Encoding OEM
$file = Get-Content "$env:temp\888.txt"
Get-Printer | Where-Object {$_.DriverName -eq "$($_.DriverName)"} | Remove-Printer
# 출력 해보기
$file = Get-Content "$env:temp\888.txt"
Write-Output $file
# 파일 경로 및 파일명을 변수에 저장
$file = "$env:temp\888.txt"
# 파일에서 프린터 드라이버 이름을 읽어와 제거
Get-Content $file | ForEach-Object { Remove-PrinterDriver -Name $_ }
Get-Printer | Where-Object {$_.DriverName -eq "Microsoft Software Printer Driver"} | Remove-Printer
이렇게 삭제 하면 삭제가 되는대. 문제는 위처럼 하면 또 안된다 -_-;;
위의 명령어로도 삭제 안되는 끔찍한 녀석들은 https://cafe.daum.net/candan/GGFN/460 이 방법대로 제거를 해야 한다. ㅎ 제거 성공
https://social.technet.microsoft.com/Forums/en-US/b6357182-abc5-40d2-9854-3f3ca6a0bb40/printing-issues-microsoft-enhanced-point-and-print-compatibillity-driver?forum=winserverTS 삭제가 안되는 놈이 이놈이네요 드디어 찾음 ㅎㅎ
Microsoft enhanced Point and Print compatibility driver
printui /s /t2
첫댓글 $file = Get-Content "$env:temp\888.txt"
Get-Printer | Where-Object {$_.DriverName -eq "$($_.DriverName)"} | Remove-Printer
Remove-Printer -Name "Microsoft XPS Document Writer"
삭제 드럽게 어렵다 ㅠㅠ 잘 안된다
Get-Printer | Select-Object Name
pnputil 이걸로 삭제 하면 안되나 보다