---
title: "Command-Line Interface"
slug: "command-line-interface"
status: "new"
updated: 2025-10-29T15:22:42Z
published: 2025-10-29T15:22:42Z
canonical: "support.anydesk.com/command-line-interface"
---

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

# Command-Line Interface

The AnyDesk Command-Line Interface (CLI) allows advanced users and IT administrators to automate installation, configuration, connection, and removal tasks. This page provides examples and common use cases for using the CLI with AnyDesk across supported platforms.

---

## When to use the command-line interface

The CLI is useful for:

- Deploying AnyDesk to many devices without manual setup
- Integrating AnyDesk into your existing IT management tools
- Automating tasks such as installation, licensing, password setup, and removal
- Starting remote sessions using scripts or automation tools

---

## Deploying AnyDesk automatically

> [!NOTE]
> **Platform:** Windows

You can use CLI commands with software deployment tools to install and configure AnyDesk on multiple devices, without manual setup on each machine.

For large-scale deployments, we recommend preparing:

- A custom **MSI Installation Package**
- Preconfigured **Customer Module** or **Service Module** of our `.exe` files

> [!NOTE]
> 🦉 You can generate and customize these modules using the custom in [my.anydesk](http://my.anydesk.com/v2).

### Standard module types

| **Module** | **Description** |
| --- | --- |
| [**Default EXE**](https://download.anydesk.com/AnyDesk.exe) | Full version from [anydesk.com](http://anydesk.com). Can start and receive connections. |
| [**Customer Module EXE**](https://download.anydesk.com/AnyDesk-CM.exe) | Can only receive connections. |
| [**Service Module EXE**](https://download.anydesk.com/AnyDesk-SM.exe) | Can only initiate connections. |

These modules can be deployed via script using commands from the [installation commands](/v1/docs/command-line-interface#installation-commands) or through your deployment software.

The following example [batch](https://en.wikipedia.org/wiki/Batch_file) script installs AnyDesk, registers the license key, and sets a password:

```dos
@echo off
AnyDesk.exe --install "C:\Install\AnyDesk\Here" --start-with-win --silent --create-shortcuts --create-desktop-icon
echo licence_keyABC | "C:\Install\AnyDesk\Here\AnyDesk.exe" --register-licence
echo password123 | "C:\Install\AnyDesk\Here\AnyDesk.exe" --set-password
```

---

## Removing AnyDesk

You can uninstall AnyDesk either manually or by using the CLI commands.

### Using `--uninstall`

The `--uninstall` parameter will start the uninstallation process for the AnyDesk client.

```plaintext
anydesk.exe --uninstall
```

This opens a user interface to guide the uninstallation process.

![Uninstall AnyDesk window showing options and warning about configuration file removal.](https://cdn.document360.io/b94c9ac2-20ec-4c7e-b325-135b0ed113f9/Images/Documentation/uninstall anydesk cli.webp)

### Using `--remove` for silent removal

For automated or script-based removal without user interaction, use the `--remove` parameter. To ensure the process runs silently without showing any messages or prompts, add the `--silent` option:

```plaintext
anydesk.exe --silent --remove
```

> [!CAUTION]
> 🚨 **IMPORTANT**
> 
> `--remove` only uninstalls the application but does **not** delete residual files or user data. To fully clean up, manually delete the following directories or include them in your script:
> 
> - `C:\Program Files (x86)\AnyDesk`
> - `%appdata%\AnyDesk`
> - `%programdata%\AnyDesk`

---

## Connecting via CLI

You can start a session using CLI parameters. This is useful for automation or if you're integrating AnyDesk with other systems. Use connection parameters as described in the [Connection Commands](/v1/docs/command-line-interface-for-windows#connection-commands).

---

## Customizing desktop shortcuts

[CLI Connection commands](/v1/docs/command-line-interface-for-windows#connection-commands) can also be used to modify desktop shortcuts created by AnyDesk.

To do this:

1. Right-click the desktop shortcut and select **Properties**.
2. In the **Target** field, add the desired parameter at the end. For example:

```plaintext
"C:\Program Files (x86)\AnyDesk\AnyDesk.exe" 123456789 --plain
```

![Application target details for AnyDesk, including location and executable path information.](https://cdn.document360.io/b94c9ac2-20ec-4c7e-b325-135b0ed113f9/Images/Documentation/CMDUseCaseShortcut-300x75.webp)

A tool that allows administrators and advanced users to automate installation, configuration, and client management tasks using command-line commands.

A downloadable file that contains the necessary components to install the AnyDesk application on a device.

## Related

- [Command-line interface for Windows](/command-line-interface-for-windows.md)
- [Command-line interface for macOS](/command-line-interface-for-macos.md)
- [Command-line interface for Linux](/command-line-interface-for-linux.md)
- [Installation](/portable-vs-installed.md)
- [Install AnyDesk](/install-anydesk.md)
