el capitan – Add an SMB printer through the terminal

Goal: Add a domain printer directly from the terminal without using its IP address.

Follow the instructions here:

I have executed this command:

sudo lpadmin -p sharp4141n -L "front office code" -E smb://ESC-PRINT01.byu.local/ESCN284_MX-4141N -P /Users/jaybrown/Desktop/ESC_PRINT01_ESC_N284_SHARP_MX_4141N_PCL6.ppd

But get the error:

lpadmin: Unknown argument “smb://ESC-PRINT01.byu.local/ESCN284_MX-4141N”.

I am in a domain. On an iMac with El Capitan. Please help me.

Enter image description here