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.
Asked
Active
Viewed 2,455 times
1 Answers
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
}

Martin Hastrup Henriksen
- 181
- 3