> 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/8.2-eol/cortex-xdr-agent-for-windows/uninstall-the-cortex-xdr-agent-for-windows.md).

# Uninstall the Cortex XDR Agent for Windows

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-db0cba31-129d-eb86-a61a-87ac02f9cd58_id183HK0SK0O4)
* [Use Msiexec to uninstall the Cortex XDR Agent for Windows](#UUID-db0cba31-129d-eb86-a61a-87ac02f9cd58_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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
