I currently administer close to 80 Xerox WorkCentre 7800 series printers. I’ve been trying to find a way to easily and quickly deploy updated configurations to these machines. The printers have a cool feature where you can setup one and then generate a clone file of the settings. Out of the box it appears the only way to then apply these settings to your fleet is to manually login via the web to each printer and upload the clone file. Xerox recommended that we try using their admin software called Centreware Web. This requires a Windows server and SQL server. I setup the server, but lets just say it’s feature set leaves a lot to be desired. It required setting up SMTPv3 which again requires pushing a new configuration to the printers (which I painstakingly did one by one). However I still could not get the application of clone files to work. I did some searching and found references to older models being configured by ‘printing’ the clone file to the printer. I tried this on one and found that it did indeed work. With a quick trip to the command line, I’ve streamlined this process.
First thing was to get the necessary info for the lpadmin
tool. I already had a spreadsheet with all of the printers info, and created a new spreadsheet with column a being the printer name, and column b the ip address. I then exported this as a comma separated value list (.csv) file.
While you could do this on your local machine I didn’t want to have all the printers, nor did I want to mix my other printers so I created the printers on an existing mac server.
Here are the steps to add printers to your machine:
- Download and install the drivers for your specific printers from the Xerox site
- Put the .csv file you created with the names and IP addresses on your desktop, name it
printers.csv
- Create a plain text file with the following code:
#!/bin/bash INPUT=printers.csv OLDIFS=$IFS IFS="," while read printer_name ip do `lpadmin -E -p $printer_name -v 'lpd://'$ip'/' -P '/Library/Printers/PPDs/Contents/Resources/Xerox\ WorkCentre\ 7845.gz'` done < $INPUT IFS=$OLDIFS
- Modify the printer driver path (marked in orange above to the appropriate driver)
- Save the file as
printerMake.sh
and place it on your desktop - In the terminal type in
chmod o+x ~/Desktop/printerMake.sh
This will give the file execute privileges - Type in
sudo ./printerMake.sh
This will loop through the printers file and add each printer to your system - Verify your results by typing
lpstat -v
This should return the list of all of the printers installed on the system
Sending Configuration Files:
- Generate your clone file on the Xerox printer and download it to the desktop of the computer with all of the printers installed.
- From the terminal type in
lpstat -p | awk {'print $2'} | while read printer; do lp -d $printer ~/Desktop/Cloning.dlm ; done
- The
Cloning.dlm
will now be sent to the printers. They will apply the settings and reboot with the new settings applied
This is genius…..any way you could offer up some instructions for a windows server?
Sorry my expertise is not in Windows by any stretch of the imagination. I would imagine you would need to write a powershell script using Get-Printer, and then iterate over that list and print using the Print command with the -d option.