Skip to content

Instantly share code, notes, and snippets.

View patgmac's full-sized avatar

Patrick Gallagher patgmac

  • Atlanta, GA
  • 08:25 (UTC -04:00)
View GitHub Profile
#!/bin/sh
# Netskope_BleedingEdge_Update.sh
# Purpose: This will update the Netskope client to the latest available from the <company> tenant.
# Updated: 05/24/2021
trigger="netskope"
tenant="tenant_name"
# check if Netskope is installed first
#!/usr/bin/env bash
# Purpose: Given a list of Apple serials (from purchasing, etc), this will help
# confirm those serials were in fact added to ABM/ASM by your reseller.
#
# Written by: Patrick Gallagher
# Updated: 06/17/2020
# Borrowed from https://gist.github.com/talkingmoose/327427d23b422000f9d17183f8ef1d22
# This requires "jq", install with "brew install jq" or from https://stedolan.github.io/jq/
#!/bin/bash
# Script Name: jamfMigrator.sh
# By: Patrick Gallagher
# Updated: 06/11/2019
version=1.2.7
oldJSS="https://oldjss.company.com:8443"
newJSS="https://newjss.company.com"
ComputerName=$(/usr/sbin/scutil --get ComputerName)
@patgmac
patgmac / reset_intuneAAD.sh
Last active March 8, 2022 13:24
Reset InTune AAD
#!/bin/bash
# Reset InTune/Jamf integration. Removes all files and keychain items.
# Updated by Patrick Gallagher
# Last update 03/19/2020
jamfTrigger="companyportal"
loggedInUser=$( python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");' )
if [[ $(pgrep "Company Portal") != "" ]]; then
#!/bin/bash
# McAfee Installer
# Author: Patrick Gallagher
# Created: 4/18/2012
# Modified: 01/28/2019
Version=10.5.7
pkgName="McAfee-Threat-Prevention-for-Mac-10.5.7-ePO-client-package-RTW-112.pkg"
#hf="McAfee-Threat-Prevention-for-Mac-10.5.0-274-ePO-client-package-HF1244068.pkg"
#!/bin/bash
grabConsoleUserAndHome(){
# don't assume the home folder is equal to the user's name
currentUser=""
homeFolder=""
#!/bin/bash
###
#
# Name: mcafee_dat_updater.sh
# Description: Downloads latest McAfee AV DAT and installs
# Manual update instructions https://kb.mcafee.com/corporate/index?page=content&id=KB70253
# Author: Patrick Gallagher for The Home Depot
# Created: 03-23-2018
#
###
#!/bin/bash
###
#
# Name: ec_checkLDAPmatch_EA.sh
# Description: Checks if local user name matches what is authenticated in EC
# Author: Patrick Gallagher
# Created: 2018-02-16
#
###
if [[ -d "/Applications/Enterprise Connect.app" ]]; then
#!/bin/bash
# check_root_shell.sh
shell="$(/usr/bin/dscl . -read /Users/root UserShell)"
if [[ "$shell" == *"false"* ]]; then
echo "<result>Yes</result>"
else
echo "<result>No</result>"
#!/bin/bash
# checkUsersWithoutSecureToken.sh
#
# Purpose: Determines which users do not have a Secure Token on High Sierra
# This tells us which users will not be able to add other users via sysadminctl.
#
# Written by: Patrick Gallagher
OSvers=$( sw_vers -productVersion | cut -d. -f2 )
# Check if this is a pairing Workstation