0

I manage about 600 computers, and we are replacing most of them. The old computers have a list of printers installed that are specific to that PC. When I replace the computers, I would like to copy all of the printers from the old machine to the new machine. I am aware that this is possible by going to printmanagement.msc and selecting migrate printers, however I am looking for a more streamlined way of doing this considering I will be replacing nearly 500 machines. Any help would be much appreciated.

cooten
  • 1
  • 2

1 Answers1

1

Maybe you can use something like this (I have not tested it):

$OldComputer = "computer1"
$NewComputer = "computer2"

$OldComputerPrinters = Get-Printer -ComputerName $OldComputer

foreach($Printer in $OldComputerPrinters)
{
    $PrinterName   = $Printer.Name
    $PrinterDriver = $Printer.DriverName
    $PrinterPort   = $Printer.PortName

    Add-Printer -Name $PrinterName -DriverName $PrinterDriver -PortName $PrinterPort -ComputerName $NewComputer -ErrorAction SilentlyContinue
}