Skip to content

Instantly share code, notes, and snippets.

View patent-ed's full-sized avatar

Ed patent-ed

  • Washington DC
View GitHub Profile
@patent-ed
patent-ed / removezoom.sh
Last active May 20, 2024 23:15
remove Zoom from macOS endpoint computers using a script run from a Jamf policy, you can create a Bash script that targets the main components and directories associated with Zoom. This script will uninstall the Zoom application, remove associated files, and clean up any residual data.
#!/bin/bash
# Script Name: removezoom.sh
# Description: Remove Zoom client form macOS endpoint
# Author: Ed Arnold
# Date: May 20, 2024
# Version: Script version 1.1
# Exit immediately if a command exits with a non-zero status.
# set -e
@patent-ed
patent-ed / passwordcxdates.sh
Created May 8, 2024 11:04
Jamf Pro Extension Attribute that Reports Last Password Change Date
#!/bin/bash
# Script Name: Jamf EA Report Last Password Change Date
# Description: Jamf Pro Extension Attribute that Reports Last Password Change Date
# Author: Ed Arnold
# Date: May 7, 2024
# Version: Script version 1.1
# Exit immediately if a command exits with a non-zero status.
# set -e
@patent-ed
patent-ed / slack_user_applications.sh
Created May 8, 2024 10:45
Slack Install to Users Applications folder, because managed helper need admin to update
#!/bin/bash
# Script Name: Slack Install to Users Applications folder
# Description: Slack Install to Users Applications folder, because managed helper need admin to update
# Author: Ed Arnold with help and start from Zach Fleck, Mac Admins slack channel
# Date: May 7, 2024
# Version: Script version 1.2
# Exit immediately if a command exits with a non-zero status.
# set -e
@patent-ed
patent-ed / gist:5488b22167062ea3641f32efa3435e63
Created March 27, 2024 18:40
Script that will reissue personal recovery key and prompt for User and Password
#!/bin/bash
# Prompt the user for their username and password
userCredential=$(osascript -e 'Tell application "System Events" to display dialog "Please enter your username and password:" default answer "" with hidden answer' -e 'text returned of result')
userPassword=$(osascript -e 'Tell application "System Events" to display dialog "Please enter your password:" default answer "" with hidden answer' -e 'text returned of result')
# Parse the username and password from the user input
username=$(echo "$userCredential" | cut -d, -f1)
password=$(echo "$userPassword" | cut -d, -f1)
@patent-ed
patent-ed / cylance-tokenizer.sh
Last active February 13, 2024 14:20
Cylance-Jamf-activator
#!/bin/sh
#####
# Installs Cylance along with the token. You enter the token as variable $4 in Jamf
#####
# version 1.1
# Created by Nathan Beranger, January 2018
#####
# Revision notes:
#
@patent-ed
patent-ed / Jamf-Policy-Trigger-Script.sh
Created February 12, 2024 17:16
Jamf-Policy-Trigger-Script
#!/bin/bash
# Open Terminal
# open -a Terminal
# define color codes
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
@patent-ed
patent-ed / splunk-jamf-ea.sh
Created January 26, 2024 01:37
Splunk Jamf Pro Extension Attribute
#!/bin/bash
exec &> /tmp/SplunkEA.log
echo "Running Splunk status check..."
# Define the path to the Splunk Forwarder binary
SPLUNK_FORWARDER_BIN="/Applications/splunkforwarder/bin/splunk"
# Check if the Splunk Forwarder binary exists
if [ -f "$SPLUNK_FORWARDER_BIN" ]; then
@patent-ed
patent-ed / remove_configprofile_signature.sh
Created January 8, 2024 17:15
remove_configprofile_signature script to loop through folder
#!/bin/bash
# Define the directory containing your .mobileconfig files.
DIRECTORY="/path/to/your/mobileconfig/files"
# Loop through all .mobileconfig files in the specified directory
for file in "$DIRECTORY"/*.mobileconfig; do
# Extract the filename without the extension
filename=$(basename "$file" .mobileconfig)
@patent-ed
patent-ed / TeamsLocationServicesEnabled.sh
Created January 5, 2024 14:42
Teams Location Services Extension Attribute
#!/bin/bash
# Force the script to quit if any error encountered
set -e
osVers=$(sw_vers -productVersion)
# Initialize array variable to hold admin usernames
list=()
NL=$'\n'
@patent-ed
patent-ed / LocationTeamsLLPDInstallenablement.sh
Created January 5, 2024 14:34
Enable location service for macOS Teams and more form e911 enablement
#!/bin/bash
# This script enables location services on macOS
# Write the default setting to enable location services
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -bool true
# Kickstart the location service to apply changes
/bin/launchctl kickstart -k system/com.apple.locationd