CMS_RemoveComputerFromDepartmentGroup

Description

Removes a specified computer from a department group

For Business Unit support click here

Syntax

CMS_RemoveComputerFromDepartmentGroup(sUnit, sGroup) As Boolean

[bool]CMS_RemoveComputerFromDepartmentGroup -group <string>

Parameters

sUnit (String)

Unit name

sGroup (String)

Group name

Return value

Boolean, TRUE if function completed successfully.

Boolean, TRUE if function completed successfully.

Example

VBScript
 If bStatus Then bStatus = CMS_RemoveComputerFromDepartmentGroup(gsUnitName, "Rome_Sales")
PowerShell
if (CMS_RemoveComputerToDepartmentGroup -group 'Rome_Sales') { $cs.Job_WriteLog("Removed", "Computer removed from department group: 'Rome_Sales'") }

Scripting Guidelines

Related functions

CMS_AddComputerToDepartmentGroup