# CMS_AddComputerToPowerSchemeGroup

> Adds the specified computer to the specified power scheme group.

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

### Description

Adds the specified computer to the specified power scheme group

### Syntax

**VBScript**

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

**PowerShell**

```powershell
[bool] CMS_AddComputerToPowerSchemeGroup -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_AddComputerToPowerSchemeGroup(gsUnitName, "CapaInstaller")
```

**PowerShell**

```powershell
if (CMS_AddComputerToPowerSchemeGroup -group 'CapaInstaller') {
  $cs.Job_WriteLog("Added", "Computer added to power scheme group: 'CapaInstaller'")
}
```

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

### Related functions

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