Installing new SMB Printers

roethelbc
New Contributor III

We are getting ready to retire our old printer server and install a new one. We have about 150 printers on it and I was trying to find a way to script the migration from old to new. We are keeping the same device names and drivers. Anyone have any useful tips for removing the old printer and updating to the new one that does not involve manually adding all those printers into the JSS?

2 REPLIES 2

Look
Valued Contributor III

Depending on the makes and models you can script adding printers to MacOS without too much bother.
Are they all from the same vendor or is it kind of a mix and match, also do you have a naming convention for the printers? A single vendor and a good naming convention make these things much easier.

davidacland
Honored Contributor II
Honored Contributor II

You can edit the printers that are in the JSS via the API, so if it is only the print server IP or fqdn that is changing, you could run a loop script to update the entries.

You have to run policies for the clients to remove the printers and re-add them. If it is 150 printers, I'd probably script that on the clients with a looping lpadmin script. I.e. read each installed printer on the target Mac, store the info in arrays for protocol, name, ppd, url etc, then run lpadmin to install each entry found in the array.

You can use arrays in a bash script if thats a language you're comfortable with: http://www.amsys.co.uk/2014/03/using-arrays-bash/

An alternative could be for the new print server to take the name of the old print server, so the JSS and clients don't know the difference.