View gist:55d107a569978a1b2113
#!/bin/bash | |
# Disabling First-run dialogs in Office 2016 for Mac | |
# Link: http://macops.ca/disabling-first-run-dialogs-in-office-2016-for-mac/ | |
if [[ -e "/Applications/Microsoft Excel.app" ]]; then | |
/usr/bin/defaults write /Library/Preferences/com.microsoft.Excel kSubUIAppCompletedFirstRunSetup1507 -bool true | |
elif [[ -e "/Applications/Microsoft OneNote.app" ]]; then | |
/usr/bin/defaults write /Library/Preferences/com.microsoft.onenote.mac kSubUIAppCompletedFirstRunSetup1507 -bool true | |
elif [[ -e "/Applications/Microsoft Outlook.app" ]]; then |
View gist:4ff699b3f7660ae06a13
Automatically check for updates: | |
Enable: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool TRUE | |
Disable: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool FALSE | |
Download newly available updates in the background: | |
Enable: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticDownload -bool TRUE | |
Disable: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate 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 |
View com.apple.loginwindow.plist
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>TALLogoutSavesState</key> | |
<string>0</string> | |
</dict> | |
</plist> |
View getosversionfromdmg.py
#!/usr/bin/python | |
# | |
# getosversionfromdmg.py | |
# | |
# 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: |
View set_dns_search_domains_on_wifi_interfaces
#!/bin/bash | |
# For the SearchDomains variable, change the search domains | |
# to be the ones you need, separated by spaces. For example, | |
# if you needed to set verizon.com and comcast.com as DNS | |
# search domains, SearchDomains would be set like this: | |
# | |
# SearchDomains="verizon.com comcast.com" | |
# | |
View gist:11221544
#!/bin/bash | |
# | |
# User-editable variables | |
# | |
# For the fileURL variable, put the complete address | |
# of the zipped Casper QuickAdd installer package | |
fileURL="http://server_name_here.domain.com/quickadd_name_goes_here.zip" |
View resize_vm_boot_partition.sh
#!/bin/bash | |
# Resize boot volume to occupy all available space on the partition | |
/usr/sbin/diskutil resizeVolume / R |
View gist:6552a3010931f7a5b5ae
#!/bin/bash | |
# 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 |
View gist:94b8f1989b7c7d0c95ca
#!/bin/bash | |
LOGGER="/usr/bin/logger" | |
# 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. |