# CMS_AddComputerToCalendarGroup

> Adds the computer to the specified calendar group.

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

### Description

Adds the computer to the specified calendar group.

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

### Syntax

**VBScript**

```vb
CMS_AddComputerToCalendarGroup(sUnit, sGroup) As Boolean
```

**PowerShell**

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

### Parameters

#### sUnit (String)

Unit name.

#### sGroup (String)

Group name.

### Return value

Boolean. `True` if the function completed successfully.

### Example

**VBScript**

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

**PowerShell**

```powershell
if (CMS_AddComputerToCalendarGroup -group 'calendar1') {
  $cs.Job_WriteLog("Added", "Computer added to calendar group: 'calendar1'")
}
```

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

### Related functions

[CMS_RemoveComputerFromCalendarGroup](/capainstaller/vb-scripting-library/cms-functions/cms-removecomputerfromcalendargroup/) [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/)
