Skip to content

Instantly share code, notes, and snippets.

rtrouton / gist:55d107a569978a1b2113
Created Aug 10, 2015
Disabling First-run dialogs in Office 2016 for Mac
View gist:55d107a569978a1b2113
# Disabling First-run dialogs in Office 2016 for Mac
# Link:
if [[ -e "/Applications/Microsoft" ]]; then
/usr/bin/defaults write /Library/Preferences/ kSubUIAppCompletedFirstRunSetup1507 -bool true
elif [[ -e "/Applications/Microsoft" ]]; then
/usr/bin/defaults write /Library/Preferences/ kSubUIAppCompletedFirstRunSetup1507 -bool true
elif [[ -e "/Applications/Microsoft" ]]; then
rtrouton / gist:4ff699b3f7660ae06a13
Created Dec 27, 2014
Software Update keys in Yosemite's /Library/Preferences/
View gist:4ff699b3f7660ae06a13
Automatically check for updates:
Enable: sudo defaults write /Library/Preferences/ AutomaticCheckEnabled -bool TRUE
Disable: sudo defaults write /Library/Preferences/ AutomaticCheckEnabled -bool FALSE
Download newly available updates in the background:
Enable: sudo defaults write /Library/Preferences/ AutomaticDownload -bool TRUE
Disable: sudo defaults write /Library/Preferences/ AutomaticDownload -bool FALSE
View SecureToken and sysadminctl in 10.13 (based on 10.13.2)
sysadminctl is a tool Apple introduced in 10.10 for working with system user accounts. In 10.13,
sysadminctl is Apple's recommended tool for working with user accounts in the CLI, replacing functionality
that has long been provided by dscl and adds new features available only in 10.13.
sysadminctl can be used to change user passwords, create new users (including automatically provisioning
the user home folder) or check the status of a new-to-10.13 security feature named SecureToken.
SecureToken is a user attribute like password type or user home location. SecureToken is not publicly
documented by Apple so it is not possible to provide a full technical description, but in practice one
needs only to know if a user has SecureToken or not. Having SecureToken set signifies that a user can
unlock a FileVault-encrypted volume. Without the SecureToken bit on a user account, that user will not
rtrouton /
Created Aug 14, 2015
Disable "Reopen windows..." on logout, restart or shutdown
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
# Copyright (c) 2014 The Regents of the University of Michigan
# Retrieves the OS version and build from the InstallESD.dmg contained in
# a typical "Install (Mac) OS X <Name>.app" bundle.
# To run:
rtrouton / set_dns_search_domains_on_wifi_interfaces
Created Jun 5, 2015
This script will set specified DNS search domains on a Mac's wireless interface(s).
View set_dns_search_domains_on_wifi_interfaces
# For the SearchDomains variable, change the search domains
# to be the ones you need, separated by spaces. For example,
# if you needed to set and as DNS
# search domains, SearchDomains would be set like this:
# SearchDomains=""
rtrouton / gist:11221544
Last active Feb 27, 2018
Script that checks for JAMF's Casper agent and verifies that it's communicating properly with the Casper server. Script assumes that the user has a web server where a Casper QuickAdd package is available for download as a .zip file.
View gist:11221544
# User-editable variables
# For the fileURL variable, put the complete address
# of the zipped Casper QuickAdd installer package
rtrouton /
Created Mar 3, 2017
Resize boot volume using diskutil to occupy all available space on the partition
# Resize boot volume to occupy all available space on the partition
/usr/sbin/diskutil resizeVolume / R
rtrouton / gist:6552a3010931f7a5b5ae
Created May 11, 2015
Script to install the latest available version of Adobe Flash for OS X. Includes check of the Developer ID Installer certificate to verify it was signed by Adobe.
View gist:6552a3010931f7a5b5ae
# This script downloads and installs the latest Flash player for compatible Macs
# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Determine current major version of Adobe Flash for use
# with the fileURL variable
rtrouton / gist:94b8f1989b7c7d0c95ca
Last active Dec 7, 2017
Preinstall script for Sophos Enterprise Anti-Virus for Mac OS X 9.2.x installer
View gist:94b8f1989b7c7d0c95ca
# Determine working directory
install_dir=`dirname $0`
# Uninstall existing copy of Sophos 8.x by checking for the
# Sophos Antivirus uninstaller package in /Library/Sophos Anti-Virus.
# If present, the uninstallation process is run.