Skip to content

Instantly share code, notes, and snippets.

@sdagley
sdagley / prefs3.py
Created November 1, 2022 17:26
Version of scriptingosx's PrefsTool (https://github.com/scriptingosx/PrefsTool) updated for Python 3 as installed by the MacAdmins python repo (https://github.com/macadmins/python)
#!/usr/local/bin/managed_python3
# Update of https://github.com/scriptingosx/PrefsTool to work with
# install of https://github.com/macadmins/python
import os
import sys
import argparse
from Foundation import (NSUserDefaults,
CFPreferencesAppValueIsForced,
#!/bin/bash
## RipOff-McAfee.sh
## version 2.3
##
## Author: Adam Scheblein, McAfee IT
## E-Mail: [email protected]
##
## version 2.1 mods by Steve Dagley <@sdagley Jamf Nation/Twitter/MacAdmins Slack>
## Updated launchctl calls to use bootout instead of unload
## Remove Privileged HelperTool added with ENS 10.7.1
@sdagley
sdagley / McAfeeENS10.7.1postinstall.bash
Last active December 7, 2021 01:40
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
#!/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
#
@sdagley
sdagley / RipOff-McAfee v2.1.sh
Last active April 1, 2021 17:09
Based on RipOff-McAfee.sh V2 by [email protected] launchctl calls to use bootout instead of unloadRemoves Privileged HelperTool added with ENS 10.7.1Terminates McAfee Agent Status Monitor when unloading launch items
#!/bin/sh
## RipOff-McAfee.sh
## version 2.0
##
## Author: Adam Scheblein, McAfee IT
## E-Mail: [email protected]
##
## version 2.1 mods by Steve Dagley <@sdagley Jamf Nation/Twitter/MacAdmins Slack>
## Updated launchctl calls to use bootout instead of unload
@sdagley
sdagley / Install McAfee Agent Status Monitor PrivilegedHelper.sh
Created September 29, 2020 02:26
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
#!/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
#!/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
#!/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