Adding Printers to OS X from the Command Line

After a little searching, I found out you can add printers to OS X from the command line using this syntax:

lpadmin -p Printer_Name -L "Printer Location" -E -v lpd://x.x.x.x -P /Library/Printers/PPDs/Contents/Resources/en.lproj/Printer_Driver.gz

If you don’t specify the -P option, it will not show up in your Print or Printer Setup dialogs. If you want to include the generic PPD, it is located here:

/System/Library/Frameworks/ApplicationServices.framework/Versions \ /A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd

That path is all one line, with no spaces.