CMS\_AddComputerToDepartmentGroup
Description
Section titled “Description”Adds a specified computer to the specified department group
It will be unlinked from current department group (if any), since a computer only can be in one department group
For Business Unit support click Business Unit support
Syntax
Section titled “Syntax”:vb: CMS_AddComputerToDepartmentGroup(sUnit, sGroup) as Boolean
:ps: [bool]CMS_AddComputerToDepartmentGroup -group <string>
Parameters
Section titled “Parameters”sUnit (String)
Unit name
sGroup (String)
Group name
Return value
Section titled “Return value”:vb: Boolean, TRUE if function completed successfully.
:ps: Boolean, TRUE if function completed successfully.
Example
Section titled “Example”:vb: VBScript
Section titled “:vb: VBScript”If bStatus Then bStatus = CMS_AddComputerToDepartmentGroup(gsUnitName, "CapaInstaller"):ps: PowerShell
Section titled “:ps: PowerShell”If (CMS_AddComputerToDepartmentGroup -group 'CapaInstaller') { $cs.Job_WriteLog("Added", "Computer added to department group: 'CapaInstaller'")}Related functions
Section titled “Related functions”CMS_RemoveComputerFromDepartmentGroup