> ## Documentation Index
> Fetch the complete documentation index at: https://docs-xcor.paloaltonetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the CXDOT Collector on Windows

> Install the CXDOT Collector in a supported Windows environment.

export const MyTenant = () => <>
    Replace <em><code>TENANT</code></em> with the name of your Cortex XCOR tenant.
  </>;

Install the CXDOT Collector on Windows to collect telemetry data and send that
telemetry data to Palo Alto Networks Cortex XCOR.

## Supported environments and versions

The CXDOT Collector supports Windows environments with either x86\_64 (AMD64) or ARM64
architecture, on Windows 10 version 1803 or later or Windows Server 2019 or later.

## Prerequisites

Before installing the CXDOT Collector on Windows, you must meet these prerequisites:

* `tar.exe` must be available on your `PATH`.
* You must have Windows PowerShell 5.1 or later installed.
* You must have an API token from a
  [restricted service account](/administer/accounts-teams/service-accounts#create-a-restricted-service-account)
  with a write-only scope.

## Install

To install the CXDOT Collector on Windows, follow these steps.

<Note>
  For a long-running deployment, install the CXDOT Collector in a stable location, and
  register the Collector as a Windows service.
</Note>

1. Run the following command to download and install the CXDOT Collector:

   ```shell theme={null}
   $CxdotCollectorVersion = "VALUE"
   $EncodedVersion = [Uri]::EscapeDataString($CxdotCollectorVersion)
   $InstallerUrl = "https://artifactregistry.googleapis.com/download/v1/projects/chronosphereio/locations/us/repositories/release-binaries/files/cxdot-collector%3A$EncodedVersion%3Acxdot-collector-install.ps1:download?alt=media"
   $InstallDir = Join-Path $PWD "cxdot-collector"

   $Installer = (Invoke-WebRequest -UseBasicParsing -Uri $InstallerUrl).Content
   & ([ScriptBlock]::Create($Installer)) -InstallDir $InstallDir
   ```

   Replace *`VALUE`* with the version of the CXDOT Collector to use (for
   example, `1.4.0+otel-0.157.0`).

   This script creates `cxdot-collector.exe`, `cxdot-admin.exe`, an example
   configuration file, and a software license in `.\cxdot-collector`.

2. Run the following command to make a copy of the example configuration file:

   ```shell theme={null}
   $InstallDir = Join-Path $PWD "cxdot-collector"
   Copy-Item (Join-Path $InstallDir "config-example.yaml") (Join-Path $InstallDir "config.yaml")
   notepad.exe (Join-Path $InstallDir "config.yaml")
   ```

3. In the environment where the CXDOT Collector is deployed, create an environment
   variable named `XCOR_API_TOKEN`, and set its value to your
   Cortex XCOR API token.

4. Add the `api_token` key to your YAML configuration file, and set its value to
   `${env:XCOR_API_TOKEN}`:

   ```yaml title="config.yaml" theme={null}
   cxdot:
     egress:
       tenant:
         api_token: ${env:XCOR_API_TOKEN}
   ```

5. Set the name of your Cortex XCOR tenant by adding the following key to your YAML
   configuration file:

   ```yaml title="config.yaml" theme={null}
   cxdot:
     egress:
       tenant:
         org_name: TENANT
   ```

   <MyTenant />

6. Run the following command to start the CXDOT Collector:

   ```shell theme={null}
   $InstallDir = Join-Path $PWD "cxdot-collector"
   & (Join-Path $InstallDir "cxdot-collector.exe") `
     --config (Join-Path $InstallDir "config.yaml") `
     --set cxdot.debug.enabled=false
   ```

   The CXDOT Collector writes logs to `stdout`. To confirm that the Collector is running,
   look for the message `Everything is ready`.

   Additionally, you can confirm whether
   [host metrics](/ingest/xcor/integrations/collector/host) appear in your
   Cortex XCOR tenant. The CXDOT Collector's default configuration collects telemetry
   data from your host environment, like information about memory, network activity,
   and uptime. If these metrics appear in your tenant, that means the Collector
   started up successfully.

After you install the CXDOT Collector, the Collector uses the
[Host](/ingest/xcor/integrations/collector/host) and [Windows](/ingest/xcor/integrations/collector/windows)
integrations to collect operating system metrics from your Windows host. Configure
these integrations to customize or disable their behavior.

## Upgrade

To upgrade the CXDOT Collector to a new version, follow these steps:

1. Stop any active Collector processes.

2. Run the same command that you used to [install](#install) the Collector:

   ```shell theme={null}
   $CxdotCollectorVersion = "VALUE"
   $EncodedVersion = [Uri]::EscapeDataString($CxdotCollectorVersion)
   $InstallerUrl = "https://artifactregistry.googleapis.com/download/v1/projects/chronosphereio/locations/us/repositories/release-binaries/files/cxdot-collector%3A$EncodedVersion%3Acxdot-collector-install.ps1:download?alt=media"
   $InstallDir = "DIRECTORY"

   $Installer = (Invoke-WebRequest -UseBasicParsing -Uri $InstallerUrl).Content
   & ([ScriptBlock]::Create($Installer)) -InstallDir $InstallDir
   ```

   Replace the following values:

   * *`VALUE`*: The new version of the CXDOT Collector to use (for example,
     `1.4.0+otel-0.157.0`).
   * *`DIRECTORY`*: The directory where you originally installed the CXDOT Collector.


## Related topics

- [CXDOT Collector](/ingest/xcor/collector.md)
- [Install the CXDOT Collector on Linux](/ingest/xcor/collector/install/linux.md)
- [Install the CXDOT Collector in a Kubernetes cluster](/ingest/xcor/collector/install/kubernetes.md)
- [Windows](/ingest/xcor/integrations/collector/windows.md)
- [Debug the CXDOT Collector](/ingest/xcor/collector/debug.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.