**USE AT YOUR OWN RISK**
Although this script has been tested by CA Support, it's not possible to account for every possible scenario. Avoid unexpected results by TESTING this script in your environment, and checking the results, before releasing to large numbers of endpoints.
Download the attached ZIP file.
Provide the "-clean" option to have the script remove the entire CA folder from Program Files (x86), and to have it remove the entire "ComputerAssociates" registry key.
Without the -clean option, only the ..\CA\DSM folder is removed, leaving any shared components that may be used by other CA products. Also without the "-clean" option, the registry is trimmed of only items belonging to Client Automation, and the remainder of the "ComputerAssociates" key is left untouched.
The script relies on the ability to read the "HKEY_LOCAL_MACHINE\SOFTWARE\~Wow6432Node~\ComputerAssociates\Unicenter ITRM" key, in order to find the location of the DSM folder. If this key is not found, the script will not make any changes.