Skip to content

Instantly share code, notes, and snippets.

### I think this is what Addigy is running to "Heal" the MDM connection
sudo launchctl kickstart -k system/com.apple.mdmclient.daemon
@aanklewicz
aanklewicz / Get Hash for PKG for Munki.sh
Created June 14, 2023 15:14
This is the format Munki uses to get a hash for a pkg file.
shasum -a 256 /PATH/TO/PKG
@aanklewicz
aanklewicz / Onboarding newstaff.sh
Created January 16, 2021 03:17
This script will create an account in Google Apps or whatever it's called now, it adds them to their groups and then creates an account on ManageBac
#!/bin/sh
# This script will create an account in Google Apps or whatever it's called now, it adds them to their groups and then creates an account on ManageBac
# Usage ./Onboarding\ newstaff.sh -f Jean-Luc -l Picard -o "/Teachers"
# -o can be "/Teachers" or "/Admin Staff"
while getopts "f:l:o:" opt; do
case $opt in
f) FIRSTNAME=$OPTARG ;;
#!/bin/sh
# Usage ./Onboarding\ students.sh -f Jean-Luc -l Picard -g 2040
# -g is the year the student graduates, as emails look like jean-luc.p@2040.domain.com
# -g is also used to put them in the right OU which is /Students/2040Grads
while getopts "f:g:l:" opt; do
case $opt in
f) FIRSTNAME=$OPTARG ;;
g) GRAD=$OPTARG ;;
#!/bin/sh
# usage ./Email\ reset.sh -e username@domain.com
while getopts "e:" opt; do
case $opt in
e) EMAIL=$OPTARG ;;
*) echo 'error' >&2
exit 1
esac
@aanklewicz
aanklewicz / macOS 11 Compatibility.sh
Last active June 23, 2020 17:13
Checks to see if your mac is compatible with macOS 11 Big Sur
model=$(sysctl hw.model)
if echo $model | grep -Ei "(MacBookAir[6-9]|MacBookPro1[0-6]|MacPro[6-7]|MacBook(10|9|8)|Macmini[7-8]|MacPro[6-7]|iMacPro1),\d|iMac1(4,4|[5-9],\d)" ; then
echo "macOS 11 Compatible"
else
echo "macOS 11 Incompatible"
fi