Sometimes when you are installing or uninstalling the CAS role from an Exchange 2010 server, the setup process hangs during the CAS installation/uninstallation process, right at the point that the GUI says:
performance counters for the client access server role are being configured
It would be good to wait up to 30 minute, but if you’ve waited longer than that, the process will not finish. If you check the App Log at this point, you will see some errors related to Exchange performance counters. If you cancel the setup using Task Manager and then restart the process, it will finish the second time without any significant issues. It’s happened to me three times so far, once during installation and twice during uninstallation, and quitting the process and restarting it again resolved the problem.