---
title: "Windows"
slug: "windows"
description: "Learn how to install the Traceable Platform Agent on a Windows machine. This step-by-step topic covers prerequisites, installation instructions, and how to configure the agent. It also includes details on setting environment variables like TA_ENVIRONMENT and restarting the agent service to ensure proper telemetry reporting to Traceable AI. Ideal for users looking to monitor and secure APIs with Traceable on Windows environments."
updated: 2025-05-21T06:20:50Z
published: 2025-05-21T06:20:50Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://traceabledocs.document360.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Windows

Traceable supports deploying its Platform agent on a Microsoft Windows machine. The Platform agent runs as a background service similar to `systemctl` in the Unix environment.

## Before you begin

Make a note of the following before you proceed with installation and configuration:

- Make sure that you have login access to the Traceable Platform. You would need to generate a Traceable token to connect the Traceable Platform agent to the Traceable Platform.
  - You can obtain a token by completing the following steps:

Copy and save the generated token, as you cannot reaccess it. You can only edit or delete the name of the token. This token is used in the steps detailed below. If this token is deleted from Traceable Platform (UI), the communication between the Traceable Platform agent and Traceable Platform (UI) will break. In such a case, generate and update a new token in the Platform agent.

![traceable_generate_authentication_token](https://cdn.document360.io/24f14f07-13d1-4684-8fae-6d8f811768ee/Images/Documentation/traceable_generate_authentication_token(2).png)
    1. Log in to your Traceable account.
    2. Navigate to **Settings**(![image-1638268402925](https://cdn.document360.io/24f14f07-13d1-4684-8fae-6d8f811768ee/Images/Documentation/image-1638268402925.png)) → **Account →** **Agent Tokens**.
    3. Click on **Generate Token**.
- Download the Windows agent from Traceable’s [download](https://downloads.traceable.ai/#install/traceable-agent/windows/latest/) site. Navigate to **install** → **traceable-agent**→ **windows** → **latest** folder.
- Make sure that you have administrative privileges in PowerShell.
- By default, the Platform agent is installed in the `/Program Files/Traceable` folder.

#### Limitations

Make a note of the following limitations for Traceable’s Platform agent for Windows:

- The following functionalities are not supported with the Windows agent:
  - Blocking
  - Sampling
- OPA distributor service is not supported.

---

## Configuration

Complete the following steps to install the Traceable Platform agent:

1. Unzip the Platform Agent zip file that you downloaded earlier. An install script is part of the unzipped folder.
2. Open a Powershell window with administrative privileges.
3. Use the install script to install the agent. Enter the following command:

```plaintext
.\install.ps1 Install -Endpoint api.traceable.ai -Token <api-token>
```

The command takes the following inputs:

| **Argument** | **Mandatory** | **Default** | **Description** |
| --- | --- | --- | --- |
| `Endpoint` | Yes | — | Traceable Platform API endpoint. |
| `Token` | Yes | — | API refresh token for connecting to the Traceable Platform. |
| `Environment` | No | `default` | The environment to which TPA reports. |
| `ConfigOverrideFile` | No | — | File path of config override file (use quotes around the path). |
| `HttpProxy` | No | — | HTTP proxy endpoint, if any. |
| `HttpsProxy` | No | — | HTTPS proxy endpoint, if any. |
| `NoProxy` | No | — | Comma-separated list of endpoints to bypass proxying. It supports IPs, CIDR, domains, and wildcards. |
| `InstallDir` | No | `C:\\Program Files\\Traceable` | The directory where binaries and config files are stored. |
| `DataDir` | No | `%LocalAppData%\\Traceable` | Directory for logs and persistent files. |
| `TempDir` | No | `%Temp%\\Traceable` | Directory for temporary files such as trace and metrics buffers. |

A successful installation would give you an output similar to that shown in the screenshot below:

#### ![](https://cdn.document360.io/24f14f07-13d1-4684-8fae-6d8f811768ee/Images/Documentation/traceable_windows_agent_successful_install(1).png) Set the environment name for the Traceable Platform agent

Complete the following steps to set the environment name for the Traceable Platform agent:

1. Navigate to "Edit the System environment variables."
  - Right-click on "This PC" and select "Properties."
  - Click "Advanced system settings" on the left-hand side.
  - In the "System Properties" window, click the "Environment Variables" button.
2. Add a new environment variable `TA_ENVIRONMENT` and set the value to the environment name you want to use.
  - Under "System variables," click "New."
  - In the "New System Variable" window, set `TA_ENVIRONMENT` as the "Variable name" and the environment name (e.g., "Production" or "Development") as the "Variable value."
  - Click "OK" to save.
3. Restart the Traceable platform agent service:
  - Open the Command Prompt as Administrator.
  - Run the following commands to stop and start the service:

```plaintext
sc stop Traceable
sc start Traceable
```

---

## Verification

Run the following command to view the current status of the Traceable agent:

```plaintext
sc query Traceable
```

The `sc query Traceable `command is equivalent to `systemctl status` command in a Unix environment. It would give you an output similar to as shown below:

![](https://cdn.document360.io/24f14f07-13d1-4684-8fae-6d8f811768ee/Images/Documentation/traceable_windows_agent_status_verification.png)

---

## Uninstall

You can uninstall the Traceable agent on Windows using the provided script or by manually removing the service and files.

### Option 1: Uninstall using the `install.ps1` script

If you still have the original installation directory, run the following command in an administrative PowerShell window:

```plaintext
.\install.ps1 Uninstall
```

This stops and deletes the service, and cleans up the installation files automatically.

### Option 2: Manual uninstallation

If the script is not available or you prefer manual removal, follow these steps:

1. Stop the Traceable service:

```plaintext
sc stop Traceable
```
2. Delete the Traceable service:

```plaintext
sc delete Traceable
```

Upon successful deletion, you should see a message like:

```plaintext
[SC] DeleteService SUCCESS
```
3. Remove the installation directory:

By default, the agent files are located in:

```plaintext
C:\Program Files\Traceable
```

Delete this directory to complete the uninstallation process.

---

## Troubleshooting

If there are any errors during the installation process, they are logged in the Windows EventViewer as shown below:

![](https://cdn.document360.io/24f14f07-13d1-4684-8fae-6d8f811768ee/Images/Documentation/traceable_windows_agent_troubleshooting.png)

---

##
