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` |
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/sh | |
IFS=$'\n' | |
allPorts=`networksetup -listallnetworkservices | grep -v asterisk` | |
for port in $allPorts | |
do | |
networksetup -setv6off "$port" | |
echo "$port" IPv6 is Off | |
done | |
exit 0 |
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 check and keep looping till the Dock is loaded | |
# This can be used to launch or execute app or script after the Dock loads. | |
# | |
# | |
dockStatus=$(pgrep -x Dock) | |
echo "Waiting for Dock to launch" | |
while [[ "$dockStatus" == "" ]] | |
do |