> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/chaos-testing/infrastructure/windows/upgrade.md).

# Upgrade Windows infrastructure

Run the commands in **PowerShell as Administrator** on the VM where the Windows chaos infrastructure is installed.

### Uninstall the current version <a href="#uninstall-the-current-version" id="uninstall-the-current-version"></a>

Replace `1.55.0` with the version currently installed:

```bash
powershell -Command "& { Invoke-WebRequest -Uri 'https://app.harness.io/public/shared/tools/chaos/windows/1.55.0/uninstall.ps1' -OutFile 'uninstall.ps1' -UseBasicParsing; .\uninstall.ps1 }"
```

{% hint style="info" %}
**CAPTURE THE SERVICE ACCOUNT**

Note the account that runs the `WindowsChaosInfrastructure` service before uninstalling. You need the same credentials in the install step.
{% endhint %}

### Install the new version <a href="#install-the-new-version" id="install-the-new-version"></a>

Replace `1.56.0` with the target version, and supply the captured admin credentials, `infraID`, and `access key` (both readable from `C:\HCE\config.yaml`):

```bash
powershell -Command "& { Invoke-WebRequest -Uri 'https://app.harness.io/public/shared/tools/chaos/windows/1.56.0/install.ps1' -OutFile 'install.ps1' -UseBasicParsing; .\install.ps1 -AdminUser '.\<your-account-username>' -AdminPass '<your-account-password>' -InfraId '<infra-id>' -AccessKey '<access-key>' -ServerUrl 'https://app.harness.io/gratis/chaos/mserver/api' }"
```

Notes:

* `.\` in `AdminUser` indicates a local account. For a domain account, replace it with the domain.
* If the VM is behind a proxy, append `-HttpsProxy <proxy>` `-HttpProxy <proxy>` `-NoProxy <bypass>` to the install command.

### Verify the upgrade <a href="#verify-the-upgrade" id="verify-the-upgrade"></a>

```bash
sc query WindowsChaosInfrastructure
```

You can also confirm the version from **Resilience Testing → Project Settings → Resilience Testing Infrastructures → Windows**.

![Windows upgrade verified](/files/2K611P9STHYgz4Y9nFHf)
