Menu Close

Microsoft 365 Reset (3.0.0)

A MOFA-parity update to the MDM-agnostic, unified, user-friendly macOS script to repair, reset, or remove Microsoft 365 components

Background

A December 2023 Microsoft 365 Reset (2.0.0b1) via Jamf Pro Self Service post detailed a “quick-and-dirty Jamf Pro Policy hack for testing Microsoft_Office_Reset_2.0.0.pkg” (which still works as advertised today, more than 1,000 days later).

However, while conducting some internal training, I was pained by how user un-friendly the workflow seemed — even if it did get the job done — which motivated the development of the modern, unified approach that Microsoft-365-Reset.zsh now delivers.

Slideshow

Overview

The latest version is always available in the Microsoft-365-Reset repository on GitHub.com.

The Microsoft-365-Reset.zsh script seeks to provide an MDM-agnostic, unified, user-friendly approach to all of Paul’s Office-Reset goodness.

Additionally, one resolution to the nightmare that is the Adobe Acrobat Add-in Removal for Microsoft 365 is also included.

Under-the-hood

The script consolidates the expanded package workflows into one easy-to-use tool with:

  • Interactive swiftDialog UI in self-service, test, and debug modes
  • Non-interactive execution in silent mode
  • Dependency-aware operation resolution
  • Deterministic execution order
  • Shared logging and exit codes for automation
  • Auto-repair for selected Microsoft apps using Microsoft-hosted packages
  • MOFA community-maintained reset script contents adapted into the unified workflow

This is a potentially destructive script. It runs as root and — depending on the operations selected — it can:

  • Permanently delete local data: Outlook mailbox data (also removed by reset_factory), OneNote content that has not synced to the cloud, Office templates and preferences, and sign-in items in the user’s keychain
  • Remove security tooling: remove_defender uninstalls Microsoft Defender
  • Remove every Microsoft 365 app: remove_office also deletes local Outlook profile data, managed preferences, and the shared /Library/Logs/Microsoft folder, which other Microsoft products (for example, Defender and Intune) also write to
  • Force-quit Microsoft apps: unsaved work in Word, Excel, PowerPoint, Outlook, OneNote, OneDrive, and Teams is lost; interactive modes tell the user to save first; silent runs give no warning

There is no undo. Apps can be reinstalled and caches rebuild themselves, but deleted mail, unsynced notes, keychain items, and removed security tooling need separate recovery.

  • test mode is not a dry-run; it performs real operations
  • silent mode shows no dialogs and skips the destructive-action confirmation
  • self-service refuses to run without an explicit --operations / $5 allowlist unless --allow-all-operations / $6 is set

Test in a lab or on a VM — first confirming known-working backups — before broad deployment.

MOFA Parity

The MOFA Community scripts are built upon the original Office-Reset.com tools, ensuring they remain up-to-date, reliable, and continuously improved. 

  • MOFA alignment:
    • Separate reset_license and reset_credentials operations align with MOFA’s separate license-only and broader sign-in reset flows
    • App repair/reinstall flows for Word, Excel, PowerPoint, Outlook, and OneNote stop after repair without continuing into configuration cleanup, matching current MOFA behavior
    • Teams background preservation (destination folders created in the console user’s context), TCC reset, and retention of a valid current Teams app bundle align with current MOFA behavior
    • remove_office removes only the Office-owned children of /Library/Application Support/Microsoft (MAU2.0, MERP2.0, Office365) and no longer forgets the Defender (com.microsoft.wdav) package receipt, matching current MOFA Office Removal; like MOFA, it still removes /Library/Logs/Microsoft and ~/Library/Application Support/Microsoft
    • reset_onenote keeps the OneNote container (~/Library/Containers/com.microsoft.onenote.mac), which holds the local sync cache, matching current MOFA behavior; only remove_onenote_data removes it
    • Reset operations ask Microsoft apps to quit (SIGTERM), wait 2 seconds (3 for reset_factory) only when something was running, then force-quit (SIGKILL) anything left; reset_powerpoint and removal operations force-quit immediately, matching current MOFA behavior
    • remove_office, remove_outlook_data, remove_skypeforbusiness, remove_webexpt, and remove_zoomplugin flush cached preferences before deleting preference files, matching current MOFA behavior; the flush is limited to the console user and root
    • remove_zoomplugin targets the paths Zoom’s ZoomMacOutlookPlugin.pkg installs, matching current MOFA Zoom Plugin Removal
  • Intentional divergences from current MOFA behavior:
    • reset_factory directly performs MOFA-aligned suite cleanup and intentionally adds package-era dependency expansion; it archives classic Teams backgrounds before cleanup and requires destructive confirmation in interactive modes because it deletes the Office group container, including local Outlook data
    • Reset operations leave profile-delivered /Library/Managed Preferences files in place; MOFA’s Word, Excel, Outlook, OneNote, OneDrive, and Teams resets remove that app’s managed preference files. Only remove_office removes them here
    • reset_teams suppresses Screen Recording settings in silent mode, preserves classic and work-or-school Teams bundles during a standard reset, does not install current Teams when its main app bundle is absent, and stops before cleanup when Teams backgrounds cannot be archived or staged (backgrounds under a symlinked parent directory are skipped with a WARNING and cleanup continues); backgrounds are archived, staged in the console user’s home folder, and restored as the console user instead of in a fixed /tmp path
    • AutoUpdate registration treats new Teams as the current TEAMS21 product while keeping classic Teams on the legacy product ID
    • remove_zoomplugin and remove_skypeforbusiness do not remove Dock entries; MOFA uses a bundled dockutil, and this repo adds no third-party dependency
    • remove_webexpt stops WebEx Productivity Tools processes by install path, and webexmta by exact name, instead of MOFA’s bare pluginagent pattern, so other vendors’ plugin agents keep running
    • remove_defender, remove_zoomplugin, and remove_webexpt run a vendor uninstaller only when it and every parent directory are root-owned and not writable by non-admin users; MOFA runs any executable uninstaller it finds
    • Auto-repair logs a WARNING and relies on the Microsoft signature check when the server reports no Content-Length for a package; MOFA fails the repair instead. A reported size that does not match the download still fails the repair
  • Repo-local operations without current MOFA community-script equivalents:
    • reset_teams_force is a repo-local operation ID that exposes the force-reinstall behavior available through MOFA Teams reset’s INSTALL=force argument; MOFA does not provide a separate force-reset script
    • remove_acrobat_addin remains a repo-local workflow without a current MOFA community-script equivalent

What’s New

3.0.0

⚠️ Breaking Change: ⚠️  

  • reset_onenote (and therefore reset_factory) no longer deletes the OneNote container (~/Library/Containers/com.microsoft.onenote.mac), which holds the local sync cache, including notes not yet synced to the cloud; MOFA and the package-era workflow both keep it
    • add remove_onenote_data — which requires destructive confirmation in interactive modes — to any policy that relied on the old behavior

Highlights:

  • Reviewed MOFA community-script pull requests #26–#41 (merged 21-Oct-2026) against the unified workflow
  • reset_factory now requires the destructive-action confirmation in interactive modes (silent is unchanged), because it deletes the Office group container (~/Library/Group Containers/UBF8T346G9.Office), including local Outlook data, Office templates, and custom dictionaries
  • Reset operations now ask apps to quit (SIGTERM), wait briefly only when something was running, then force-quit (SIGKILL) anything left
  • Keychain cleanup now reaches the console user’s login keychain when root’s HOME is not the console user’s home folder (for example, a management agent running with HOME=/var/root); previously, sign-in items could be silently left in place
  • remove_office, remove_outlook_data, remove_skypeforbusiness, remove_webexpt, and remove_zoomplugin now cover additional MOFA-aligned paths and flush cached preferences before deleting preference files
  • Keychain items that remain after repeated deletion now fail the operation (exit 20)
  • See CHANGELOG.md for complete details

Support

Best-effort support is available on the Mac Admins Slack (free, registration required) — sans a dedicated channel for this script — or you can open an issue (after reviewing the README.md).

Posted in Microsoft Office, Scripts, swiftDialog, Tips & Tricks

Related Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.