CMS_AddUnitToBusinessUnit
Description
Adds the unit on which the script is executed to the specified Business Unit. UserJobs add user and ComputerJobs add the computer
Syntax
CMS_AddUnitToBusinessUnit(sBusinessUnitName) as Boolean
[bool]CMS_AddUnitToBusinessUnit -businessunitname <string>
Parameters
sBusinessUnitName (String)
BusinessUnit name
Return value
Boolean, TRUE if function completed successfully.
Boolean, TRUE if function completed successfully.Â
Example
VBScript
If bStatus Then bStatus = CMS_AddUnitToBusinessUnit("CapaInstaller")
PowerShell
if (CMS_AddUnitToBusinessUnit 'bu_verona') {
$cs.Job_WriteLog("Added", "Unit added to the Verona Business unit")
}