This is a powershell script which removes and re-adds printers with a different driver. The example below is for Lexmark, to change from the desktop driver to the universal driver, but it can be adjusted to work with any drivers.
$driver = "Lexmark Universal v2"
$pattern = "Lexmark*Class*"
$printers = Get-Printer | where { $_.DriverName -like $pattern }
foreach ($printer in $printers) {
Remove-Printer -InputObject $printer
Add-Printer -Name $printer.name `
-DriverName $driver `
-PortName $printer.PortName `
-Location $printer.Location `
-Published -Shared `
-ShareName $printer.ShareName `
-Comment $printer.Comment
}
This page is designed to be text-browser compatible.
Copyright © 2007-2024 deadface.org. All rights reserved.