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
Example
VBScript
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
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") } |