Skip to main content
Solved

How you do guys deploy printers?

  • May 14, 2015
  • 29 replies
  • 145 views

Show first post

29 replies

Chris_Hafner
Forum|alt.badge.img+27
  • Jamf Heroes
  • May 18, 2015

Am I the only that thought: "The same way girls do". Sorry, I just found it funny! In any event glad to know you've for a handle on this.


Forum|alt.badge.img+8
  • Contributor
  • November 16, 2015

Hi I refined @lwindram's script. It now uses script parameters from the JSS.

GitHub Gist

#!/bin/bash

# Original: https://jamfnation.jamfsoftware.com/discussion.html?id=14467
# Useful script for deploying printers in a Casper Environment
# Originally by Lwindram on JAMF Nation forums
# https://jamfnation.jamfsoftware.com/viewProfile.html?userID=11026
# Edited to use JSS Script Parameters to make the script portable to all Models. Define $vars in JSS Policy.

# Variables

# PPD = $4 in JSS
ppd=$4

# CUPS Name = $5 in JSS
cupsName=$5

# Display Name = $6 in JSS
humanName=$6

# IP Address and Protocol = $7 in JSS
# Be sure to add the protocol in the paramters!
ip=$7

# Building Location = $8 in JSS
bldg=$8

# Duplex = $9 in JSS
duplex=$9

# Finisher = $10 in JSS
finisher=${10}

# $11
# var=${11}

# Script

lpadmin -p $cupsName -v $ip -D "$humanName" -L "$bldg" -m "$ppd" -E -o printer-is-shared=false -o Duplex="$duplex" -o PageSize=Letter -o Finisher="$finisher"

# man lpadmin
# -p = Named printer or class
# -v = device URI
# -D = textual description of destination
# -L = location of destination
# -m = model (ppd)
# -E (at end) enables device

# CUPS Options
# man lptoptions
# -o printer-is-shared=false disables sharing
# -o Duplex=None disables two-sided printing 
# -o Duplex=DuplexNoTumble enables two-sided printing long edge
# -o Duplex=DuplexTumble enables two-sided printing short edge

# Printer has Large Capacity Tray
# lpadmin -p $cupsName -o LargeCapacityTray=Installed

# Finishing options
# Finisher/Finisher: 
# NotInstalled 
# FinRUBICONB 
# FinVOLGABBK 
# FinVOLGAB 
# FinAMURBK 
# FinAMUR  = Finisher SR3140
# FinEUPHRATESE 
# FinKINGB
# lpadmin -p $cupsName -o Finisher=$finisher

exit

I took out the bottom portion as I'm still working out the model specifics. Our environment is pretty homogenous when it comes to printers, so the CUPS settings should be fairly straightforward. I deploy this through a Self Service policy. I'll keep updating the Gist as I add more options, but a bit of DDG'ing and reading the lpoptions -p $printername -l helps a ton!


Forum|alt.badge.img+2
  • New Contributor
  • April 15, 2016

@ndelgrande2 @Aziz I am trying to deploy the InstallUniflowMacClient.dmg. What are the steps you followed in your process to create the deployment package.


Forum|alt.badge.img+1
  • New Contributor
  • July 13, 2019

@Aziz, do you mind elaborate what you did with the HP Jet Direct? You mention of chooisng the correct protol. However, what do you enter under "Device URI"?

I cannot get IPP to work on one of the newer Xerox. It will keep say ready to print.

Update: nevermind, I figured to define a different protocol, just specified in Device URI. Example, instead of ipp://youripaddress, it would be socket://youripaddress, or ldp://youripaddress