This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var https = require('https'); | |
exports.handler = (event, context, callback) => { | |
console.log("MYLOG" + JSON.stringify(event)) | |
var body = JSON.parse(event.body); | |
var name = body.event.deviceName; | |
var sernum = body.event.serialNumber; | |
var user_name = body.event.username; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const req = https.request(post_options, | |
(res) => res.on("data", () => callback(null, "OK"))) | |
req.on("error", (error) => callback(JSON.stringify(error))); | |
req.write(post_data); | |
req.end(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lpa='/usr/sbin/lpadmin' | |
${lpa} -p CopyThat -E -o printer-is-shared=false -v lpd://10.89.170.5 \ | |
-P "/Library/Printers/PPDs/Contents/Resources/Xerox WorkCentre 7855.gz" | |
${lpa} -p CopyThat -o Duplex=DuplexNoTumble -o XROutputColor=PrintAsGrayscale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lpa='/usr/sbin/lpadmin' | |
case $printer in | |
Printer1) | |
${lpa} -p Printer1 -E -o printer-is-shared=false -v ipp://10.1.1.1/ipp/print \ | |
-D "Printer1" -P "/Library/Printers/PPDs/Contents/Resources/Xerox WorkCentre 5955.gz" | |
;; | |
Printer2) | |
${lpa} -p Printer2 -E -o printer-is-shared=false -v ipp://10.1.1.2/ipp/print \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ ! -f "/Library/Printers/PPDs/Contents/Resources/Xerox WorkCentre 5955.gz" ]]; then | |
/usr/local/bin/jamf policy -trigger xeroxGenericDriver | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Name: addPackages.sh | |
# Date: 27 Mar 2018 | |
# Author: Steve Wood (steve.wood@omnicomgroup.com) | |
# Purpose: used to stub out packages in the Jamf Pro database | |
# The CSV file needs to be saved as a UNIX file with LF, not CR | |
# Version: 1.1 | |
# Update: 27 Mar 2018 - fixing an error in the counter | |
# A good portion of this script is re-purposed from the script posted in the following JAMF Nation article: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" standalone="no"?> | |
<a:fontScheme name="Arial" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"> | |
<a:majorFont> | |
<a:latin typeface="Montserrat"/> | |
<a:ea typeface="" /> | |
<a:cs typeface="" /> | |
</a:majorFont> | |
<a:minorFont> | |
<a:latin typeface="Montserrat"/> | |
<a:ea typeface="" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/path/to/script/addPackages.sh <jssuser> <jsspass> /path/to/textfile.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Name: addPackages.sh | |
# Date: 3 nov 2017 | |
# Author: Steve Wood (swood@integer.com) | |
# Purpose: used to stub out packages in the Jamf Pro database | |
# The CSV file needs to be saved as a UNIX file with LF, not CR | |
# Version: 1.0 | |
# | |
# A good portion of this script is re-purposed from the script posted in the following JAMF Nation article: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3 ls s3://<yourbucketaddress> >> ~/mypackages.txt |