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
Code Block | theme | Eclipse|||
---|---|---|---|---|
| ||||
If bStatus Then bStatus = CMS_AddUnitToBusinessUnit("CapaInstaller") |
PowerShell
Code Block | ||
---|---|---|
| ||
if (CMS_AddUnitToBusinessUnit 'bu_verona') { $cs.Job_WriteLog("Added", "Unit added to the Verona Business unit") } |