> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr-agent/7.9-ce/cortex-xdr-agent-7.9-for-windows/uninstall-the-cortex-xdr-agent-for-windows.md).

# Uninstall the Cortex XDR Agent for Windows

Learn how to uninstall the Cortex XDR agent from a Windows endpoint.

You can uninstall the Cortex XDR agent using any of the following methods on a Windows endpoint:

* From the Cortex XDR management console. Refer to Uninstall the Cortex XDR Agent in the Administrator’s Guide for your Cortex XDR license type.
* [Manually Uninstall the Cortex XDR Agent for Windows](#UUID-fd494380-e35e-f649-98ce-71753fc80820_id183HK0SK0O4)
* [Use Msiexec to uninstall the Cortex XDR Agent for Windows](#UUID-fd494380-e35e-f649-98ce-71753fc80820_id183HK0T0302)

After you uninstall the agent, the endpoint is no longer protected by the Security policy of your company and the license returns to the pool of available licenses.

#### Manually Uninstall the Cortex XDR Agent for Windows

Use the following workflow to manually uninstall the Cortex XDR agent. If you intend to use Cytool in Step 1, ensure that you know the uninstall password before performing this procedure.

1. Use one of the following methods to disable the Cortex XDR agent security protection on the endpoint:
   * Run the **`Cytool protect disable`** command.
   * Apply an Agent Settings profile that disables XDR **Agent Tampering Protection** on the endpoint.
2. Select Start → Control Panel → (Programs) → **Programs and Features**.
3. Select **Cortex XDR** from the list and then **Uninstall**.
4. When prompted to continue uninstalling, click **Yes** and acknowledge any notifications.

#### Uninstall the Cortex XDR Agent for Windows Using Msiexec

Use the following workflow to uninstall the Cortex XDR agent using Msiexec. If you intend to use Cytool in Step 1, ensure that you know the uninstall password before performing this procedure.

1. If you are uninstalling XDR Agent using the MSI file via SCCM or another software management system, use one of the following methods to disable the Cortex XDR agent security protection on the endpoint:
   * Run the **`Cytool protect disable`** command.
   * Apply an Agent Settings profile that disables XDR **Agent Tampering Protection** on the endpoint.
2. Use one of the following options to open a command prompt as an administrator:
   * Select Start → All Programs → **Accessories**. Then right-click **Command prompt** and **Run as administrator**.
   * Select **Start**. In the **Start Search** box, type **cmd**. Then, to open the command prompt as an administrator, press **CTRL**+ **SHIFT**+ **ENTER**.
3. Run the **`msiexec`** command followed by one or more of the following options or properties:

   * Uninstall and logging options:

     * **`/x<installpath>\<installerfilename>.msi`**—Uninstall a package.
     * **`/l*v <logpath>\<logfilename>.txt`**—Log verbose output to a file.

     For a full list of Msiexec parameters, see <https://docs.microsoft.com/en-us/windows/desktop/Msi/command-line-options>

   For example, to uninstall the Cortex XDR agent using the cortexxdr.msi installer with the specified password and log verbose output to a file called uninstallLogFile.txt, enter the following command:

   ```screen
   C:\Users\username>msiexec /x c:\install\cortexxdr.msi /l*v c:\install\uninstallLogFile.txt 
                     
   ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr-agent/7.9-ce/cortex-xdr-agent-7.9-for-windows/uninstall-the-cortex-xdr-agent-for-windows.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
