Today I encountered a strange issue when trying to decommission a DAG member, after properly removing it from the DAG as explained here, and checking services like address book generation server where hosted on one of the other DAG members.
I started the removal process from an elevated command prompt (using the GUI doesn’t work as it complains about the need to use setup.com, which I can’t since I’m using the GUI):
setup /m:uninstall
The output was the following:
Hmm. Without even looking at the Exchange setup log, I noticed there was something strange with the error message:
The term ‘C:\Program Files\Microsoft\Exchange Server\V14\Bin\ManageScheduledTask.ps1’ is not recognized as the name of a cmdlet, function, script file, or operable program.
As you probably know, all Exchange scripts are located in the Scripts folder, not the Bin folder.
I tried a quick and dirty fix, which was to copy the ManageScheduledTask.ps1 and ManageScheduledTask.strings files to the Bin folder, and again started setup /m:uninstall. This time, Exchange uninstalled nicely.
From experience, this isn’t expected behavior, but in case you encounter this problem in the field, you now know how you can easily work around this.
Update: I’ve seen identical issues when retrying an upgrade on Exchange 2010 SP1 to SP2. I think the problem is code-related (i.e. bug), as the uninstall part of the upgrade process should check for those files in “scripts”, not “bin”. Note that with case of the failing SP2 upgrade, the file EnterpriseServiceEndpoints.xml was also MIA (that one should be in bin). I worked around that by copying the file from the installation source.
Wish I would have found this post earlier. This is exactly what I need to fix a botched install. I guess I found it hard to believe that Microsoft could not and did not test the uninstall. I did not copy the .xml file to bin as a result the uninstall did fail on Preparing Files but re-running the uninstall show that it is fully uninstalled anyway.
Thanks
LikeLike
Many Thanks for That ! Was also stuck with a botched install of 2010 on W2012.
Best Regards,
Steve.
LikeLike
You save my time !!!
Many thanks
LikeLike
Pingback: Exchange Server 2010 – Issues Uninstalling Exchange – OakIT
Worked! I tried a quick and dirty fix, which was to copy the ManageScheduledTask.ps1 and ManageScheduledTask.strings files to the Bin folder, and again started setup /m:uninstall. This time, Exchange uninstalled nicely.
LikeLike
file EnterpriseServiceEndpoints.xml was also MIA (that one should be in bin).
LikeLiked by 1 person
Good Man Michel this post preserved some hair follicles
LikeLike