Skip to content

Instantly share code, notes, and snippets.

@ranguli
Last active April 19, 2021 17:08
Show Gist options
  • Save ranguli/d069182125c4b655c4dda582166fc5ac to your computer and use it in GitHub Desktop.
Save ranguli/d069182125c4b655c4dda582166fc5ac to your computer and use it in GitHub Desktop.
#######################
# Office 365ServiceV2 #
#######################
plist="com.microsoft.Office365ServiceV2"
defaults write "$plist" SendAllTelemetryEnabled -bool false
#####################
# Office Autoupdate #
#####################
plist="com.microsoft.autoupdate.fba"
defaults write "$plist" SendAllTelemetryEnabled -bool false
##########################
# Office Error Reporting #
##########################
plist="com.microsoft.errorreporting"
false_items=(
"IsAttachedEnabled"
"IsStoreLastCrashEnabled"
"SendCrashReportsEvenWithTelemetryDisabled"
)
for i in "${false_items[@]}"; do
defaults write "$plist" "${false_items[$i]}" -bool false
done
##########
# Office #
##########
false_items=(
"SendCrashReportsEvenWithTelemetryDisabled"
"AllowVisualBasicToBindToSystem"
"InstallOneDrive"
"InstallOneNote"
"InstallOutlook"
"OfficeExperiencesAnalyzingContentPreference"
"OfficeExperiencesDownloadingContentPreference"
"OptionalConnectedExperiencesPreference"
"SendAllTelemetryEnabled"
"VBAObjectModelIsTrusted"
"ConnectedOfficeExperiencesPreference"
"OfficeExperiencesAnalyzingContentPreference"
"OfficeExperiencesDownloadingContentPreference"
"OptionalConnectedExperiencesPreference"
)
plist="com.microsoft.office"
for i in "${false_items[@]}"; do
defaults write "$plist" "${false_items[$i]}" -bool false
done
true_items=(
"VisualBasicEntirelyDisabled"
"DefaultsToLocalOpenSave"
"DisableVisualBasicExternalDylibs"
"DisableVisualBasicMacScript"
"DisableVisualBasicToBindToPopen"
)
for i in "${true_items[@]}"; do
defaults write "$plist" "${true_items[$i]}" -bool true
done
defaults write "$plist" VisualBasicMacroExecutionState "DisabledWithoutWarnings"
defaults write "$plist" DiagnosticDataTypePreference "ZeroDiagnosticData"
###################
# Error Reporting #
###################
false_items=(
"IsAttachedEnabled"
"SendCrashReportsEvenWithTelemetryDisabled"
)
plist="com.microsoft.errorreporting"
for i in "${false_items[@]}"; do
defaults write "$plist" "${false_items[$i]}" -bool false
done
###########
# Outlook #
###########
defaults write com.microsoft.Outlook AllowedEmailDomains -array "('!')"
defaults write com.microsoft.Outlook SignInOptions -int 4
##############
# PowerPoint #
##############
false_items=(
"SendAllTelemetryEnabled"
"SendCrashReportsEvenWithTelemetryDisabled"
)
plist="com.microsoft.PowerPoint"
defaults write "$plist" SignInOptions -int 4
########
# Word #
########
plist="com.microsoft.Word"
defaults write "$plist" SignInOptions -int 4
#########
# Excel #
#########
plist="com.microsoft.Excel"
defaults write "$plist" SignInOptions -int 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment