ComplianceJob - setAutoRemediation_1


ComplianceJob - setAutoRemediation

Description :

This command sets/resets the Auto Remediation options on a Compliance Job. This command returns a handle to the updated job.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

jobKey

DBKey

The handle to the Compliance Job.

jobName

String

The name for the auto-remediation job.

depotGroup

String

The name of the depot group to store the files in.

jobGroup

String

The name of the job group to store the remediation job in.

isAutoRemediate

Boolean

The auto-remediation state for the job - true = set.

useComponentDeviceForTargets

Boolean

Use the device of a component as the target of the remediation - true(default) = devices are targets.

keepUniquePackageProps

Boolean

Indicate if the package should uniquely save each local property for the compliance rule packages that are used

Example

The following example shows you how to set the auto-remediation data for a compliance job that will use the devices associated with any component targets of the job as the deploy targets.

Script


# Name of the existing compliance job.

JOB_NAME="compliancejob"

# Job group in which Compliance Job is stored.

JOB_GROUP="/Workspace/Compliance"

# Get the Compliance Job DBKey using the above information.

JOB_DBKEY=`blcli ComplianceJob getDBKeyByGroupAndName $JOB_GROUP $JOB_NAME`

# Set the Compliance Job auto-remediation flag.

JOB_DBKEY=`blcli ComplianceJob setAutoRemediation $JOB_DBKEY "Remediation job name" "depotGroupName" "jobGroupName" "true" "true" "true"`



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Server Automation Command Line Interface 8.7