I installed Exchange 2016 tools on my desktop machine back in 2017. Since then numerous CUs have come out and we migrated to Office 365. Years later we upgraded the last couple Exchange servers we have to 2019 for ongoing hybrid management. This old 2016 installation is just legacy baggage at this point.
When I tried to uninstall, however, I found that I couldn't. I suppose because the management tools were on an old CU, they weren't compatible with the current state of my desktop. The error I was getting was pretty non-descript, it was the old "An Incomplete Installation Was Detected" error. Well, this was not, in fact, an incomplete installation. It was just management tools and old.
The recommended guidance was to basically do a fresh install to the latest CU and try again but that just seemed silly, so I executed the uninstall from the command line to try to get more info. This is the cached setup.exe that exists in the Exchange installation, not the one off the installation ISO (which I no longer had lying around).
MpsSvc is the Windows Firewall. Not a surprise here that it can't muck around with that, but we can just temporarily adjust the ACL using sc sdshow/sdset, like below. Make sure to record the original ACL! It might change over time if you are viewing this article years later, so do a fresh sdshow to confirm.
I copied the ACL from a more permissive service picked at random. In this case, atashost. Using sdset, the permissions were applied.
Now I ran the installer again. I got further but still failed at a step.
This time it was AppIDSvc. The ACL looked fine, but maybe it's being protected somehow in a way I don't understand. I did find an article while searching that mentioned you can remove it (and others) from the uninstall script. So I did that.
I edited ServiceControl.ps1 and removed both the signature (since we were breaking that) and the AppIDSvc from it.
And here we go again!
Now return the firewall service to it's original state.
Exchange still showed up for me in Programs and Features, but clicking uninstall again indicates it did get removed and this is just Windows Installer leftover stuff it will clean up on its own.
The last bit of cleanup was just removing the Exchange Server program folders. Unfortunately, this didn't work right away as files were locked.
Guessing these might be locked until reboot, I rebooted.
And that did the trick!