I am facing issue while uninstalling sharepoint 2010 foundation. may be this error occur because before installing sharepoint 2010 foundation we have tried to installing sharepoint 2013 foundation, but due to some AppFabric related issue we prefer to switch SP 2010 foundation.
so while installing SP 2013 foundation IIS 6 was required, and we installed it using server manager, but after change in plan we had successfully installed sharepoint 2010.
but while installing another required application i.e. MIM portal and service, there was require for IIS 7 or latest, (so, as we didn't had boundation for IIS 6 because we have not to install sharepoint 2013), using server manager, first we remore IIS6 from server(without uninstalled sharepoint 2010) and add new IIS 10 on server. due to this existing sharepoint 2010 was corrupted.
so now we need to uninstall shaperpoint, but facing issue to doing so.