/
CMS_AddComputerToDepartmentGroup
CMS_AddComputerToDepartmentGroup
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
If the computer is part of a Business Unit, the department group will be created within the Business Unit.
Syntax
CMS_AddComputerToDepartmentGroup(sUnit, sGroup) as Boolean
[bool]CMS_AddComputerToDepartmentGroup -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_AddComputerToDepartmentGroup(gsUnitName, "CapaInstaller")
PowerShell
If (CMS_AddComputerToDepartmentGroup -group 'CapaInstaller') {
$cs.Job_WriteLog("Added", "Computer added to department group: 'CapaInstaller'")
}
Related functions
, multiple selections available,
Related content
CMS_AddComputerToStaticGroup
CMS_AddComputerToStaticGroup
More like this
CMS_AddComputerToCalendarGroup
CMS_AddComputerToCalendarGroup
Read with this
CMS_AddUnitToWSUSUnAssignedGroup
CMS_AddUnitToWSUSUnAssignedGroup
More like this
CMS_AddPackageToUnit
CMS_AddPackageToUnit
More like this
$cs.UsrMgr_AddUserToLocalGroup
$cs.UsrMgr_AddUserToLocalGroup
More like this
CMS_RemovePackageFromUnit
CMS_RemovePackageFromUnit
More like this