Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# uninstallOffice2016.sh
# Script to completely uninstall Office 2016. Per this article: https://support.office.com/en-us/article/Uninstall-Office-2016-for-Mac-eefa1199-5b58-43af-8a3d-b73dc1a8cae3
# ©2016 by Sergio Aviles.
# version 1.0 2016-11-30
# version 1.1 2016-12-08 Added an "Are you sure?" prompt at the start of the script.
#Define Logging
log_location="/Library/Logs/uninstallOffice.log"
ScriptLogging()
#!/bin/bash
osVersion=$(sw_vers -productVersion | awk -F\. '{print $2}')
if [[ ${osVersion} -ge 11 ]]; then
if [[ $(cat /private/etc/ssh/ssh_config | grep -v ^# | grep Roaming >/dev/null; echo $?) -eq 1 ]]; then
echo "<result>Enabled</result>"
else
echo "<result>Disabled</result>"
fi
else
if [[ $(cat /private/etc/ssh_config | grep -v ^# | grep Roaming >/dev/null; echo $?) -eq 1 ]]; then
@Chalcahuite
Chalcahuite / updateOAB.sh
Created January 13, 2016 18:00
Force Update Outlook 2016 OAB files
#!/bin/bash
# updateOAB.sh
# Deletes the .oab files in a User's Office 2016 profile to force a re-download of the Offline Address Book.
# version 1.0 2016-01-12
##Variables
#get user
User=$(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");')
#get current date minus 24 hours
dateMinus24h=$(date -v-86400S +%s)

Justification:

With the Mac now a second standard available to users in the Corporate division, and as more Macs start appearing in other divisions and subsidiaries, managing the support infrastructure currently in place has reached a critical level and needs an additional employee dedicated to providing this support in tandem with the Senior Mac System Engineer. In addition, this position will help with developing new automations, services and scripts/applications for imaging, IT and user support, in addition to providing Tier 3 support for Mac issues for Corporate as well as other Divisions and subsidiaries. This position will also serve as a knowledgeable and experienced back up for the Senior Macintosh Systems Engineer.

Currently, projects that are in progress to improve and maintain services are often interrupted by Tier 3 support requests and work on the projects is paused, adding this extra position will ensure that both Tier 3 support requests and handled quickly and efficiently and
@Chalcahuite
Chalcahuite / addMyDocstoEC.sh
Last active April 9, 2016 20:47
script to configure My Documents shares in Enterprise Connect.
#!/bin/bash
# configureMyDocs.sh
# script to configure My Documents shares in Enterprise Connect if Mac is joined to domain.
# ©2015 by Sergio Aviles All rights reserved.
# version 1.0 2015-10-09
#Define Logging
log_location="/Library/Logs/ces.log"
ScriptLogging()
@Chalcahuite
Chalcahuite / Error.txt
Created August 19, 2015 18:43
JSSRecipeCreator Output
pachqmacsvr04:JSSRecipeCreator-master localadmin$ ./JSSRecipeCreator.py ~/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/OmniGroup/OmniGraffle6.pkg.recipe
/Users/localadmin/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/OmniGroup/OmniGraffle6.pkg.recipe
Recipe Filename Menu
===================
0: OmniGraffle6.jss.recipe (DEFAULT)
Hit enter to accept default choice.
Enter a number to select from list.
Create a new Recipe Filename by entering name/path.
#!/bin/sh
####################################################################################################
#
# Copyright (c) 2010, JAMF Software, LLC. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright