Skip to content

Instantly share code, notes, and snippets.

View grahampugh's full-sized avatar

Graham Pugh grahampugh

View GitHub Profile
@grahampugh
grahampugh / PolicyTemplate.xml
Last active February 25, 2023 12:34
A fully edited Jamf policy template for JamfUploader
<?xml version="1.0" encoding="UTF-8"?>
<policy>
<general>
<name>%POLICY_NAME%</name>
<enabled>true</enabled>
<frequency>Ongoing</frequency>
<category>
<name>%POLICY_CATEGORY%</name>
</category>
</general>
@grahampugh
grahampugh / AutoPkg-verify-trust-info.sh
Created June 10, 2020 13:12
Runs through a recipe list and verifies trust info. Creates a trusted recipe list and sends untrusted recipes to a Slack incoming web hook.
#!/bin/bash
#
# AutoPkg verify trust of existing recipes
# by Graham Pugh
# server name, used as the username in Slack
server="$1"
# slack webhook, e.g. https://hooks.slack.com/services/ASBCDSDAD/SDFGASDF/SDFAvSDfASDFvsdfA
slack_webhook_url="$2"
@grahampugh
grahampugh / Remove Packages.sh
Last active July 31, 2022 22:04
Remove Packages using munkitools
#!/bin/bash
#######################################################################
#
# Remove Packages Script for Jamf Pro
#
# This script uses Munki's "removepackages" binary to delete software
# based on their pkg receipts.
# Requires the core Munki Tools to be installed in their default
# location on clients.
@grahampugh
grahampugh / privileges-time-limited-elevation.sh
Created May 20, 2020 13:56
A script for Jamf Pro Self Service to grant time-limited elevated user rights
#!/bin/bash
## Privileges time-limited elevation
## v. 0.1 - G. Pugh 2020-05-20
# Sets admin privileges for defined number of minutes
duration_minutes=$4
# Privileges installer policy trigger name
policy_trigger_name="Privileges-install"
@grahampugh
grahampugh / GoogleChrome.mobileconfig
Created May 25, 2022 21:34
GoogleChrome profile to force updates
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.google.Chrome</key>
@grahampugh
grahampugh / Policy-required-keys-only.xml
Last active May 25, 2022 19:51
A downloaded Jamf policy with unnecessary keys and IDs removed.
<?xml version="1.0" encoding="UTF-8"?>
<policy>
<general>
<name>Install Latest Adium</name>
<enabled>true</enabled>
<frequency>Ongoing</frequency>
<category>
<name>Testing</name>
</category>
</general>
@grahampugh
grahampugh / Policy-download.xml
Last active May 25, 2022 19:44
An example downloaded Jamf policy
<?xml version="1.0" encoding="UTF-8"?>
<policy>
<general>
<id>133</id>
<name>Install Latest Adium</name>
<enabled>true</enabled>
<trigger>USER_INITIATED</trigger>
<trigger_checkin>false</trigger_checkin>
<trigger_enrollment_complete>false</trigger_enrollment_complete>
<trigger_login>false</trigger_login>
@grahampugh
grahampugh / Firefox.jamf.recipe
Created May 13, 2022 08:27
Firefox.jamf in PLIST format
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Downloads the latest version of Firefox and makes a pkg. Then, uploads the package to the Jamf Pro Server and creates a Self Service Policy and Smart Group.
</string>
<key>Identifier</key>
<string>com.example.jamf.Firefox</string>
<key>Input</key>
@grahampugh
grahampugh / Firefox.jamf.recipe.yaml
Created May 13, 2022 08:22
Firefox.jamf recipe in YAML format
Description: |
Downloads the latest version of Firefox and makes a pkg. Then, uploads the package to the Jamf Pro Server and creates a Self Service Policy and Smart Group.
Identifier: com.example.jamf.Firefox
MinimumVersion: "2.3"
ParentRecipe: com.github.autopkg.pkg.Firefox_EN
Input:
NAME: Firefox
CATEGORY: Productivity
GROUP_NAME: "%NAME%-update-smart"
@grahampugh
grahampugh / PolicyTemplate.xml
Created May 13, 2022 08:14
PolicyTemplate for a standard JSS recipe
<policy>
<general>
<name>Install Latest %PROD_NAME%</name>
<enabled>true</enabled>
<frequency>Ongoing</frequency>
<category>
<name>%POLICY_CATEGORY%</name>
</category>
</general>
<scope>