Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save macmule/5df4fbf8f0c4179498fad8344a3597f9 to your computer and use it in GitHub Desktop.

Select an option

Save macmule/5df4fbf8f0c4179498fad8344a3597f9 to your computer and use it in GitHub Desktop.
---- Map Printers
if ADGroups contains "GROUPNAME" then
if installedPrinters does not contain "PRINTERNAME" then
try
do shell script "/usr/sbin/lpadmin -p PRINTERNAME -E -v lpd://PRINTERIP -P PPDLOCATION -L \"PRINTERLOCATION\" -o printer-is-shared=false"
on error
do shell script "/usr/sbin/lpadmin -p PRINTERNAME -E -v lpd://PRINTERIP -P /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd -L \"PRINTERLOCATION\" -o printer-is-shared=false"
end try
end if
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment