This file contains hidden or 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/bash | |
# | |
# Script to delete computers or mobile devices in Jamf Pro by serial number list | |
# Author: Karthikeyan Marappan | |
# API Role Privileges: Delete Computers and/or Mobile Devices | |
# | |
# *** Note: Please TEST the script with Non Prod Environment*** ## | |
# | |
###################### CONFIGURABLE VARIABLES ################################ | |
serialNumberList="$HOME/Desktop/sourceList.txt" # Path to text file with serial numbers |
This file contains hidden or 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/bash | |
################################################################################ | |
# Description: | |
# Adds or removes a computer (by Serial Number) to/from a static group | |
# in Jamf Pro using the OAuth 2.0 API with client credentials. | |
# | |
# Prerequisites: | |
# - Jamf Pro instance must support Bearer Token API authentication. | |
# - client_id and client_secret must belong to an API role with proper privileges. | |
# - API Privileges : Update Static Computer Groups, Read Static Computer Groups |
This file contains hidden or 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/bash | |
# Karthikeyan Marappan | |
# Slack Notification from Jamf Pro Policy | |
# Exit immediately on error | |
set -e | |
# --- Input Parameters --- | |
SLACK_WEBHOOK_URL="<SLACKWEBHOOKURL>" |
This file contains hidden or 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
# GitLab Runner config for Jamf Pro Notifications Alerter | |
# https://github.com/alectrona/jamf-pro-notifications-alerter | |
# .gitlab-ci.yml | |
stages: | |
- development | |
- production | |
development: | |
stage: development | |
script: |
This file contains hidden or 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/bash | |
# | |
# Script to update (add/remove) the existing Computer Static Group from the list of serial numbers. | |
# Karthikeyan Marappan | |
# API Role Privileges: Update Static Computer Groups | |
###################### CONFIGURABLE VARIABLES ################################ | |
serialNumberList="$HOME/Desktop/sourceList.txt" # Path to plain text file with serial numbers | |
Jamf_URL="https://karthikeyan.jamfcloud.com" # Your Jamf Pro URL | |
Jamf_URL="${Jamf_URL%/}" # Remove trailing slash if present |
This file contains hidden or 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/bash | |
# | |
# This script retrieves the Mac Hardware UUID, fetches the corresponding Computer ID from Jamf Pro, | |
# checks for any failed MDM commands, and clears them if found. | |
# | |
# Uses JAMF API Client and Roles. | |
# Add Parameter 4 & 5 with API Client ID & Client Secret when running in JAMF Policy. | |
# API Role Privileges Required: Read Computers, Flush MDM Commands. | |
# | |
# Karthikeyan Marappan |
This file contains hidden or 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/zsh | |
# Script to Set/Remove Recovery Lock on Apple Silicon Macs using the Jamf API. | |
# Works based on the 'lockMode' variable (Set/Remove) to configure Recovery Lock. | |
# | |
# Key Functionalities: | |
# - Retrieves the Mac's serial number. | |
# - Generates a 26-digit random Recovery Lock password. | |
# - Uses JAMF API Roles and Clients | |
# - Uses Jamf Pro API to: |
This file contains hidden or 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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>InstallMacOSMajorUpgrades</key> | |
<true/> | |
<key>InstallRapidSecurityResponses</key> | |
<true/> | |
<key>InstallNonSystemUpdatesWithoutRestarting</key> | |
<true/> |
This file contains hidden or 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/bash | |
# Extension Attribute (EA) script to inventory software update deferral settings on macOS | |
# Author: Karthikeyan M | |
# Optimized Version | |
# Function to retrieve values from macOS preferences | |
get_pref() { | |
osascript -l JavaScript << EOS | |
ObjC.import('Foundation') | |
ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.applicationaccess').objectForKey('$1')) |
This file contains hidden or 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/bash | |
# EA to inventory the forceDelayedMajorSoftwareUpdates and enforcedSoftwareUpdateMajorOSDeferredInstallDelay value | |
# Karthikeyan M | |
# 25-Sep-23 | |
#Software Update (com.apple.applicationaccess): | |
forceDelayedMajorSoftwareUpdates=`osascript -l JavaScript << EOS | |
ObjC.import('Foundation') | |
ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.applicationaccess').objectForKey('forceDelayedMajorSoftwareUpdates')) | |
EOS` |
NewerOlder