# CMS_AddComputerToReinstallGroup

> Adds the computer to the specified reinstall group.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/cms-functions/cms-addcomputertoreinstallgroup/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Adds the computer to the specified reinstall group

For Business Unit support click [Business Unit support](/capainstaller/vb-scripting-library/addendum/business-unit-support/)

### Syntax

**VBScript**

```vb
CMS_AddComputerToReinstallGroup(sUnit, sGroup) as Boolean
```

**PowerShell**

```powershell
[bool] CMS_AddComputerToReinstallGroup -group <string>
```

### Parameters

#### sUnit (String)

Unit name

#### sGroup (String)

Group name

### Return value

**VBScript**

Boolean, TRUE if function completed successfully.

**PowerShell**

Boolean, TRUE if function completed successfully.

### Example

**VBScript**

```vb
If bStatus Then bStatus = CMS_AddComputerToReinstallGroup(gsUnitName, "CapaInstaller")
```

**PowerShell**

```powershell
if (CMS_AddComputerToReinstallGroup -group 'reinst') {
  $cs.Job_WriteLog("Added", "Computer added to reinstall group: 'reinst'")
}
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[CMS_RemoveComputerFromReinstallGroup](/capainstaller/vb-scripting-library/cms-functions/cms-removecomputerfromreinstallgroup/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/) [Business Unit support](/capainstaller/vb-scripting-library/addendum/business-unit-support/)
