Our teachers have automatically installed printers when they change network location, login or check in, this happens once a day.
Just in case something gets screwy with the printers and they have to reinstall, I wanted to have a script that they can run in Self Service to refresh the printers.
I run the following script (which will delete all printers, even ones that they manually configured);
#!/bin/bash
#Deletes all printers installed, even non-district printers.
#
lpstat -p | awk '{print $2}' | while read printer
do
echo "Deleting Printer:" $printer
lpadmin -x $printer
done
But since the triggers I have on the printer install policies only trigger once a day, how can I do another check in ignoring that they have already checked in today.
I tried to issue a jamf recon, but that didn't work.
Any ideas?