Adding smb printer through terminal

Goal: Add a domain printer just through the terminal without using its IP address.

Following the instructions here:
https://dae.me/blog/1826/add-a-printer-via-command-line-in-os-x/#comment-256587

I ran 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 on a domain. On an iMac running El Capitan. Please help me out.

enter image description here

Answer

As per Tetsujin’s comment, it turns out I was missing the -v before the url of the printer.

Attribution
Source : Link , Question Author : Jay Brown , Answer Author : Monomeeth

Leave a Comment