Migrate Printers from Windows 2008 to 2012 with Powershell
It is possible to export all printers from Windows 2008 Server and import them again into Windows 2012. I tried this method but got just error messages and I didn’t like the fact, that it imports also the old drivers. So I installed first the necessary printer drivers on the new server and run the script below to create all the printers. It automatically adds the necessary ports and the printers. If you want to add more parameters it is easily possible.
Create CSV file with the printers (printers.csv):
Name, IP, Driver, Location
"PRINTER01", "192.168.1.10", "Xerox Global Print Driver PCL6", "Main Building, First Floor"
"PRINTER02", "192.168.1.11", "Xerox Global Print Driver PCL6", "Main Building, Second Floor"
Script to import the printers (printers.ps1):
$printers = Import-Csv c:\temp\powershell\printers.csv
foreach ($printer in $printers) {
Add-PrinterPort -Name $printer.Name -PrinterHostAddress $printer.IP
Add-Printer -Name $printer.Name -DriverName $printer.Driver -PortName $printer.Name -Comment $printer.Comment -ShareName $printer.Name
Set-printer -Name $printer.Name -Shared $true -Published $true
}
admin on June 6th 2013 in IT, Windows Server