Office 365/2019/2016 Reset & Removal

pbowden
Contributor III

Hey all,

I took some time off during the summer and completed a tool that I have been thinking about for some time. I’ve fully tested it with Jamf Pro. Hope it helps!

https://office-reset.com

41 REPLIES 41

TimArnold
New Contributor II

THANK YOU!!

This is a fantastic tool to add to our Service Desk Utilities!

CSCC-JS
Contributor II

Is there any plans to add Skype for Business removal to the tool?

Also want to say thank you for making a fantastic tool.

pbowden
Contributor III

@jstillio thanks for the feedback!
Yes, I can add Skype for Business (SfB) removal in the upcoming version. Do you want to see this option as a checkbox (ie user-based GUI) or are you looking for a separate PKG that you can push out through Jamf? If the latter, do you want SfB removed as part of the ‘Complete Removal’ or a targeted PKG to only remove SfB?

Thanks again, Paul.

ooshnoo
Valued Contributor

This is great. What is the recommended UI when using via Jamf since Jamf will run it hidden and therefore the choices won't be available

pbowden
Contributor III

@ooshnoo take a look at https://office-reset/macadmins and https://office-reset/jamf

The checkbox UI (GUI method) is mainly for consumers. For Jamf, there are two separate packages - one for Factory Reset, the other for Complete Removal.

ooshnoo
Valued Contributor

@pbowden Good deal. Thanks. If we wanted to let our users just reset a single app, is it feasable to copy and paste the scripts in packages in to Jamf and have the Jamf policy just run a script?

pbowden
Contributor III

@ooshnoo yes, that should work. I’m happy to make separate per app PKGs available if that would help

jhuls
Contributor III

@pbowden Thanks for this and the support you've been providing.

There was a time when I deeply cringed at the thought of anything related to Microsoft. It didn't matter if it was products, services, or support whether as a user or admin. You've helped turn some of that around.

CSCC-JS
Contributor II

@pbowden We still have some Office 2016 machines with Skype for Business. After upgrading to Office 2019, Skype for Business stays on the machine. A single option to push / run to just remove Skype for Business is more useful for me at least.

Our current deployment for new / wiped devices is Office 2019 & Teams.

pbowden
Contributor III

@jstillio I was putting together the package for removing Skype for Business. It's easy enough to clean up the app, config data and keychain entries. However, the SfB installer has a nasty tendency to add itself to the Dock. Are you wanting the removal package to clean up the Dock as well? Thx.

CSCC-JS
Contributor II

I can use Jamf Pro to remove it from the current user dock. My main goal was to get rid of the leftover files and remove any potential outlook client integration.

I can’t say this enough, Thank You for your time and effort on this.

pbowden
Contributor III

@jstillio thanks for the feedback! This morning I released v1.3 of the tool which includes the ability to remove Skype For Business. Head over to https://office-reset.com/jamf and you'll see a separate 'Skype For Business Removal Package' available for download. I've tested this on my Jamf Pro 10.23 instance where I pushed the package remotely through a Policy, and it correctly cleaned up the SfB app, configuration data, and keychain entries. Let me know if if you have any questions or problems!

@ooshnoo as part of the v1.3 release, I've made available separate reset packages for each app so that it gives everyone more flexibility over what options they want to run. Hope this helps!

chas_tinker
New Contributor

@pbowden The SfB uninstall worked great. Thank you! Would there be a way to submit a feature request to implement a dock removal (if exists) into the uninstaller for the apps?

pbowden
Contributor III

@chas.tinker Hey Chas, I'll take a look to see what our options are here. Probably integrate Kyle's dockutil tool if it still works with latest versions of macOS. I'll respond when I have a potential solution to see if it fits the bill.

emilshouse
New Contributor II

I tested the Factory Reset Package via a Jamf policy and run it on self service but it didn't appear to do anything; logs just showed that the package was installed but none of the scripts run. Are there any other steps I am missing?

pbowden
Contributor III

@emilshouse take a look at /var/log/install.log and search for “Office-Reset:” to see what it ran.

emilshouse
New Contributor II

@pbowden I just run it again via Self service and checked. Couldn't find anything when searching for “Office-Reset:” Below were the only entries in Install.log. Thanks.

2020-09-16 13:27:16-07 hostname installer[36257]: Product archive /Library/Application Support/JAMF/Downloads/Microsoft_Office_Factory_Reset_1.3.pkg trustLevel=350
2020-09-16 13:27:17-07 hostname installer[36257]: External component packages (13) trustLevel=350
2020-09-16 13:27:17-07 hostname installer[36257]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: location = file://localhost

pbowden
Contributor III

@emilshouse ahh, I see the problem. I'm working on a fix now. Give me a couple of hours and I'll reply when it's ready. Thanks!

pbowden
Contributor III

@emilshouse I just uploaded a new version of Office-Reset to the web site. Can you try v1.4 please and let me know if you still see a problem with the Factory Reset Package. Thanks!

emilshouse
New Contributor II

@pbowden The Factory Reset Package is working now! Thanks!

pbowden
Contributor III

@emilshouse Wonderful! Thanks for letting me know, and thanks for finding this issue!

Jason33
Contributor II

@pbowden Glad to have stumbled across these apps. But what am I missing? I cant find an icon for the app to put up in Self Service

pbowden
Contributor III

@Jason33 Hey Jason. Yeah, I just realized that this was not as obvious as I thought 🙂 ....I updated the instructions on the web site, but where you see the orange cog icons in the Downloads side-bar; simply right-click and 'Save Image As'. The graphics themselves are full 512x512 resolution, but I use CSS to scale them down when loading the images on the web page.

Hope this helps!
Paul.

mosermat
New Contributor II

@pbowden First - THANK YOU for building this incredible tool!

One thing I just came across - In our environment we use Microsoft Defender ATP. When I run the Complete Removal Package it deletes this entire directory when it removes MAU: "/Library/Application Support/Microsoft" which in my case, also contains a "Defender" folder. It appears this Defender folder is where quarantine, signatures, definitions, etc. are stored. Is there a way you can modify your 'Complete Removal Package' so it just removes the "MAU2.0" directory and not the parent "Microsoft" Directory along with it?
422b2d0a878145f58ca81e119b8930dd

EDIT Sorry I may have been a bit trigger happy on my post - After a restart this entire Defender folder reappeared...so modifying your tool may not be necessary. Interesting to know anyways. Thanks again!

chuck3000
Contributor

This looks impressive and thank you for this @pbowden
One thing maybe I missed in perusing the thread: If BOTH installs of Office, 2016 and 2019 (I 'spose I should ask about 2010 too) are installed, can I (via JAMF Policy) selectively choose which version to remove? For example, if 2016 and 2019 Word, Excel, PPT are installed, can I choose to just remove 2016 and it's pieces/parts?
Additionally, does this query only a specific drive, ie "/Volumes/Macintosh HD/" or can it query installations on mounted volumes, such as a Time Machine mounted volume, and remove the apps/pieces/parts there as well?

The reason I ask is that we have users in our office who have TimeMachine backups of the complete drive, and that obviously includes the applications too. Our Tenable scan looks at the attached drives (by Security choice), so a machine that has been updated, will still contain the older apps in the backup, and Tenable will flag it.

Knighton
New Contributor II

Many thanks!

Used this to rectify a recalcitrant Outlook account yesterday.

I'm adding to our Self Service now. Caching the package and then launching it via command

pbowden
Contributor III

@mosermat Thanks for letting me know about this! Just to be safe I'll make a change in the upcoming version to be more specific about which folders to remove under /Library/Application Support/Microsoft

pbowden
Contributor III

@chuck3000 Thanks for the feedback! Both Office 2016 and 2019 share the same app and bundle ID, so you typically don't find both versions on the same machine. In other words, if you had 2016 installed and then upgraded to 2019 (or 365), the 2016 version would be overwritten. Of course, there are ways of making 2016 and 2019 coexist such as renaming or moving the app bundle. However, long story short is that Office-Reset looks for apps with their standard name and bundle ID in the /Applications folder of the boot partition, so it won't try and mess with other versions which may exist on secondary partitions.

Hope this helps!

Paul.

chuck3000
Contributor

Thanks @pbowden
Of my inventory I found I have three machines with both 2016 and 2019 installed. Of my approx 100 seats that’s not horrible.

A couple further questions (and sorry I have not dissected the scripts yet):
Can I pick and choose what to remove or leave? Eg: only leave excel 2019 but remove the rest? Does it touch MS Remote Desktop? Does the script effect other MS apps like Skype or Teams? What about the Outlook Database vs just the app? Are the MS fonts removed too?

Thanks again for all your work!

pbowden
Contributor III

@chuck3000 Most of your questions can be answered by looking at https://office-reset.com/faq/
However, quick answers:
1. You can pick and choose which apps to 'reset'. I intentionally say 'reset' here rather than 'remove' because the purpose of the tool is to fix problems. In other words, you could choose to 'Reset Excel' and the tool will figure out what might be wrong with Excel to get it back into a working state. For example, if the tool detects that the Excel app is corrupt, it will remove it and install a new version.
2. Nope, the tool doesn't offer any support for Microsoft Remote Desktop. However, it does support both Teams and Skype for Business.
3. Yes, the tool supports both Outlook Database resets and Outlook app/preference/metadata resets.
4. Since 2016 the MS supplied fonts are embedded within the app packages and not installed into system and user locations. However, we do have Cloud Fonts and these are removed as part of the 'completely remove Office' option.

I hope this helps!

sgiesbrecht
Contributor

@pbowden This tool looks great - thank you. In the process of getting O365 installed in our environment so this will come in handy for my team

chuck3000
Contributor

@pbowden I apologize but I'm not finding details on the FAQ how to use the fix packages to simply remove the software completely. I pulled the script of the OneNote_Reset package and essentially it appears I just need to remove the "RepairApp" portions of the script and mostly rely on the clean up portion at the end (the part starting with Office-Reset: Removing configuration data for ${APP_NAME}"). Or am I making this too difficult?
Again, your powers are certainly appreciated!
I'll be sending over a Pot of coffee rather than a cup...
Best regards

pbowden
Contributor III

@chuck3000 Really appreciate the super-sized coffee! If you haven't discovered the links already, make sure you check out https://office-reset.com/macadmins and https://office-reset.com/jamf/.
If you're looking to remove Office completely from a machine (e.g. all apps, config data, preferences, etc, etc) you just need to push the Complete Removal Package download through a Jamf Policy (or put it in Self Service).

Let me know if you're looking for a custom solution or something else, and I'm more than happy to provide!

Paul.

chuck3000
Contributor

@pbowden I’m Looking to just remove a single app, oneNote in this example. But could be PowerPoint or outlook or Skype (and all the pieces of Skype/4bix).

pbowden
Contributor III

@chuck3000 Some of the apps have interdependencies on shared configuration data, so removal of a single app begs the question as to how far you want to go to clean-up, and boils down to the problem you want to solve.

Skype for Business is the easy one as it doesn't have any interdependencies, so you can remove it and all of it's configuration data with the package at https://office-reset.com/download/Microsoft_SkypeForBusiness_Removal_1.5.pkg.

Word, Excel, PowerPoint, Outlook and OneNote use shared configuration data and keychain entries, so those are the most problematic to separate. If you're simply looking to remove one of the apps because you don't use it, and would like the disk space back, then the easiest option is just to rm the app bundle in /Applications. If you wish, you can go further by using the app-specific reset package such as https://office-reset.com/download/Microsoft_PowerPoint_Reset_1.5.pkg to get remove any PowerPoint specific configuration, preferences and metadata.

On the other hand, if you're looking to remove a single app with the intention of installing it again (e.g. you suspect that the existing app might be corrupt), then simply run that app-specific reset package because it will check for corruption and repair it as necessary.

I hope this helps. Feel free to elaborate on your scenario or the specific problem you're trying to solve!

Thanks, Paul.

chuck3000
Contributor

@pbowden For my removal of OneNote alone, simply removed the app:

/bin/rm -rf "/Applications/Microsoft OneNote.app"

then I snagged this from your script and added them to my script:

/bin/rm -f "/Library/Preferences/com.microsoft.onenote.mac.plist"
/bin/rm -f "/Library/Managed Preferences/com.microsoft.onenote.mac.plist"
/bin/rm -f "$HOME/Library/Preferences/com.microsoft.onenote.mac.plist"
/bin/rm -rf "$HOME/Library/Containers/com.microsoft.onenote.mac"
/bin/rm -rf "$HOME/Library/Containers/com.microsoft.onenote.mac.shareextension"
/bin/rm -rf "$HOME/Library/Application Scripts/com.microsoft.onenote.mac"
/bin/rm -rf "$HOME/Library/Application Scripts/com.microsoft.onenote.mac.shareextension"
/bin/rm -rf "/Applications/Microsoft OneNote.app.installBackup"
/bin/rm -rf "$HOME/Library/Group Containers/UBF8T369G9.Office/OneNote"

These i'm debating if they'll hurt other installed Office apps:

/bin/rm -rf "$HOME/Library/Group Containers/UBF8T369G9.Office/FontCache"
/bin/rm -rf "$HOME/Library/Group Containers/UBF8T369G9.Office/TemporaryItems"

Appreciate your hard work...

pbowden
Contributor III

@chuck3000 Looks good. Personally, I'd recommend that you don't include those last two statements in the third block as they are shared with the other apps. Technically, the folders will get rebuilt if you delete them, but it would be better to stay safe and let them be.

mickl089
Contributor II

You are the guy who saved my ass tousand times 🙂

pbowden
Contributor III

@mickl089 you are too kind - thanks for the compliment!