--- title: "Failed to replace agent" slug: "failed-to-replace-agent" updated: 2025-09-02T08:54:38Z published: 2025-09-02T08:54:38Z canonical: "support.controlup.com/failed-to-replace-agent" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.controlup.com/llms.txt > Use this file to discover all available pages before exploring further. # Failed to replace agent ### Issue When you try to connect to an endpoint after upgrading to a new ControlUp Real-Time DX Console version, the Console is trying to upgrade the agent but fails with error: Error message Failed to replace files to match version X. Failed to terminate the server agent machine X. ![Failed to replace files to match version X error message](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/en-usarticleattachments204079725WMIError.JPG) ### Reason The reasons for this issue could be: 1. Permissions 2. Connection 3. WMI repository issue ### Possible Solution To troubleshoot connection issues, you can use ControlUp's integrated diagnostics tools against the remote machine: 1. **Ping** to test connectivity 2. **Admin$** to verify administrative rights 3. **Test WMI** - to check the WMI repository ![Diagnostics selected](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/en-usarticleattachments204079815Diagnostics.png) In case you have connection issues, refer to the [Troubleshooting Connections Issues To Managed Computers](/tim-reorg/docs/troubleshooting-connections-to-managed-computers) article. By running the Test WMI diagnostics, you are trying to execute the following command: `wmic /NODE:computername /user:domain\username SERVICE list Full` If it fails, try to run the command locally on the target endpoint to verify this is not a connection issue and is a WMI issue. If you see that the WMI repository on the remote machine where you want to upgrade the agent is corrupt, we suggest you run `winmgmt /salvagerepository` in a command prompt on the remote machine. To verify the issue is resolved, you can run `wmic service list full` and see if you get results back: ![wmic service list full output results](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image%282%29.png)