Skip to content

Instantly share code, notes, and snippets.

View improved_reorder_wifi_alt.py
#!/usr/bin/python
# Modify the Mac's WiFi Preferred Networks list to put specified SSIDs at the top of the list
# As written, this requires the following:
# - OS X 10.6+ (has been reported working through 10.12.3)
# - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6)
# - pyObjC (as such, recommended to be used with native OS X python install)
# Run with root
View DeleteADUsers.sh
#!/bin/bash
################################################################################
# DeleteADUsers.sh
#
# Created by Steve Dagley 2017-03-01
#
# Script to delete AD users accounts
# Requires Mac OS X 10.10 or newer and Casper/Jamf Pro enrolled machine for jamfHelper binary
# If run as root, deletes all AD accounts, so can be used via Policy to "clean" lab machines
# If user is logged in, asks to verify login ID and will not delete that account
@sdagley
sdagley / Install McAfee Agent Status Monitor PrivilegedHelper.sh
Created Sep 29, 2020
Install PrivilegedHelper and LaunchDaemon for the McAfee ENS 10.7.1 version of McAfee Agent Status Monitor.app so users aren't prompted for admin credentials to do the install the first time they slect the app from the McAfee Menulet
View Install McAfee Agent Status Monitor PrivilegedHelper.sh
#!/bin/sh
# Install PrivilegedHelper and LaunchDaemon for the McAfee ENS 10.7.1 version of
# McAfee Agent Status Monitor.app so users aren't prompted for admin credentials to
# do the install the first time they select the app from the McAfee Menulet
helperSourcePath="/Library/Application Support/McAfee/MSS/Applications/McAfee Agent Status Monitor.app/Contents/Library/LaunchServices/com.mcafee.agentMonitor.helper"
helperDestinationPath="/Library/PrivilegedHelperTools/com.mcafee.agentMonitor.helper"
if [ -f "$helperSourcePath" ] && [ ! -f "helperDestinationPath" ]; then
@sdagley
sdagley / RipOff-McAfee v2.1.sh
Last active Apr 1, 2021
Based on RipOff-McAfee.sh V2 by adam_scheblein@mcafee.comUpdated launchctl calls to use bootout instead of unloadRemoves Privileged HelperTool added with ENS 10.7.1Terminates McAfee Agent Status Monitor when unloading launch items
View RipOff-McAfee v2.1.sh
#!/bin/sh
## RipOff-McAfee.sh
## version 2.0
##
## Author: Adam Scheblein, McAfee IT
## E-Mail: adam_scheblein@mcafee.com
##
## version 2.1 mods by Steve Dagley <@sdagley Jamf Nation/Twitter/MacAdmins Slack>
## Updated launchctl calls to use bootout instead of unload
@sdagley
sdagley / McAfeeENS10.7.1postinstall.bash
Last active Dec 7, 2021
For use in a package containing all of the McAfee ENS 10.7.1 component ePO installer packages, this postinstall script will install the ENS components in the required order, in kextless mode, then install the PrivilegedHelper tool that was added in 10.7.1
View McAfeeENS10.7.1postinstall.bash
#!/bin/bash
## postinstall
# McAfeeENS10.7.1postinstall.bash
# by Steve Dagley <@sdagley Jamf Nation/Twitter/MacAdmins Slack/GitHub>
# postinstall script for single install package for complete install of McAfee ENS 10.7.1
#
# Incorporate RipOff_Mcafee V2.1 script from MacAdmins Slack #mcafee channel
#