How to delete a Control-M/Agent using a command or script so that it no longer appears in the Control-M Configuration Manager and the Control-M/Server database? |
Method 1: Use the command ccmcli from the Control-M/Enterprise Manager account with the option delete_agent Example: Suppose you have a Control-M/Agent with node name myagent with name ccmagname under Control-M/Server mydc, then this command syntax is as below em ccmcli -u <emuser> -p <password> -s mydc -t CTM_Server -n ccmagname -cmd delete_agent -node_id myagent It will remove the Control-M/Agent from the Control-M Configuration Manager and from the Control-M/Server database. Method 2: Use Control-M Automation API service of "config server:agent::delete" which will remove the Control-M/Agent from the Control-M Configuration Manager and from the Control-m/Server database, and its syntax is as below ctm config server:agent::delete <ctm> <agent> For detail, please refer to the Automation API guide https://docs.bmc.com/docs/automation-api/918/services-783053199.html The following video demonstrates this solution: |