[Notification] We're upgrading the JumpCloud Support Center the week of September 30th.

Support Center

(Mac) Commands Tab Policy - Adding or Deleting a Printer


Using the Commands Tab, many administrative users will deploy scripts and commands to further their ability for systems management using JumpCloud.  In working with a varied audience of users and environments, we have collaborated to create some "Policy" commands for purposes ranging from security to software management.

The commands listed in this article are specific to adding a new printer, or deleting an existing printer on a Mac system.


Note that most if not all commands will require root or a sudoer's access for proper execution.  In light of this you will need to have the following considerations when choosing the user to "Run as" for the command:
  • Run as root
  • Run as a user who has passwordless sudo access.  Note that interactive commands will not work since we are executing a remote execution, thus why passwordless sudo is specified


Adding a Printer

The following command will allow for adding a new printer onto a Mac system.  To add a new printer to the system, you will need to supply:
  • The printer name
  • The IP or DNS address
  • A path to the printer PPD file
  • A description for the printer
/usr/sbin/lpadmin -p "name of printer" -E -v lpd://"printer IP or DNS"/"queue name" -P "path to PPD file" -D "description"

Example Command:

/usr/sbin/lpadmin -p "Brother" -E -v lpd:// -P /Users/rbalboa/Desktop/brother.ppd -D "Brother Color Printer"

Deleting a Printer

The following commands will allow for deleting an existing printer on a Mac system.  To delete the printer, you will need to supply:
  • The printer name
/usr/sbin/lpadmin -x "name of printer"

Last Updated: Feb 28, 2019 08:27AM MST

Related Articles
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found