# Join Computer to Domain

> `UiPath.ActiveDirectoryDomainServices.Activities.JoinComputerToDomain`

`UiPath.ActiveDirectoryDomainServices.Activities.JoinComputerToDomain`

## Description

Adds a computer to the domain.

## Project compatibility

Windows - Legacy | Windows

## Configuration

### Common

* **DisplayName** - The display name of the activity.

### Computer

* **ComputerName** - The specific name of the computer that is intended to join the domain.
* **Password** - The password for the provided username. This field supports only secured strings and SecureString variables.
* **Username** - The name of a user with administrative rights on the computer that wants to join the domain. If no username is provided, then it uses the user's name under which the Robot is running. This field supports only strings and String variables.

### Input

* **CreateComputerAccount** - Indicates whether the activity creates a computer account in Active Directory for the given computer. The name of the computer account is the value specified in the **ComputerName** parameter. The computer account is created under the specified parent. If there is no value set for the parent, then the computer account is saved in the default computer location. The default value is **True**.
* **Location** - Specifies the name of the parent entry for the newly created computer account.
* **Rejoin** - Indicates whether the computer rejoins the specified domain, even when it is already joined. The default value is **True**.
* **Connection** - Establish the connection that needs to be used. There are two available options, **Primary** and **Secondary**. The default option is **Primary**.

### Misc

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

:::note
This activity works only as part of an **Active Directory Scope** activity where the following parameters **ActiveDirectoryServer**, **Username**, **Password** have explicit values. The activity is setting up a Remote WMI Connection from the Robot machine to the target Computer, therefore all the system requirements and configuration requirements for such a connection apply here.
:::
