> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/ras-windows-cli-guide/commands/addconnection.md).

# addconnection

![Parallels](https://www.parallels.com/static/pl/fileadmin/res/img/navigation/pl-logo-dk.png)

## AppserverClient Command Line Interface

### addconnection

creates a new connection with or without showing the UI.

**Category: Connections**

```
AppServerClientCLI addconnection [-type ras/rdp] [-server 10.2.3.4]  [-username user] [-password pwd] [-alias alias] [-mode 0] [-port 443] [-window 12345]  
```

### Arguments

* **`type (optional)`** Specify the type of connection to add, which can be either RAS or RDP.
* **`server (optional)`** Specify the server to connect to.
* **`username (optional)`** Specify the username.
* **`password (optional)`** Specify the password.
* **`alias (optional)`** Specify the display name of the connection.
* **`mode (optional)`** Specify the connection mode.
* **`port (optional)`** Specify the port to connect to. If not specified, port 443 will be used.
* **`window (optional)`** Specify the window handle that will be used as the parent to any UI required.

### Return codes:

ok - Command was successful\
NotAvailable - Communication with the client backend failed, ensure that the client is running\
InvalidArgs - Some arguments are missing or invalid\
AlreadyPresent - New connection cannot be added since the server and friendly name are already used\
AccessDenied - Logged on user does not have permission to perform the action\
ElevationAccess - CLI process is running at a higher process privilege\
Exception - System problem

### Examples:

AppServerClientCLI addconnection\
AppServerClientCLI addconnection -type rdp\
AppServerClientCLI addconnection -type ras -server myserver -username user -password pwd\
AppServerClientCLI addconnection -type rdp -server myserver -username user -password pwd

### Notes:

If you do not pass any arguments, or specify the type only, the UI will be used to enter the remaining information.\
If you need to add a connection without UI, you need to specify the server, username and password. Other arguments are optional.

### See also:

[listconnections](/landing/ras-windows-cli-guide/commands/listconnections.md)\
[updateconnection](/landing/ras-windows-cli-guide/commands/updateconnection.md)\
[duplicateconnection](/landing/ras-windows-cli-guide/commands/duplicateconnection.md)\
[deleteconnection](/landing/ras-windows-cli-guide/commands/deleteconnection.md)\
[getshareddevice](/landing/ras-windows-cli-guide/commands/getshareddevice.md)\
[setshareddevice](/landing/ras-windows-cli-guide/commands/setshareddevice.md)\
[clearshareddevice](/landing/ras-windows-cli-guide/commands/clearshareddevice.md)


---

# 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://docs.parallels.com/landing/ras-windows-cli-guide/commands/addconnection.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.
