Server - setPropertyValue
Server - setPropertyValue
Description :
This command sets a property value on a server. The property name must be defined in the Server property class. The property must be defined as editable.
You can use the BMC BladeLogic blenc encryption utility to encrypt values you set with this command. The syntax is:
blenc value
where value is the value you want to encrypt.
Sample usage:
KEY=`blcli Server getServerDBKeyByName server1`
VAL=`blenc "property_value" | grep ^BLencrypt: | cut -f2 -d: | tr-d '[:cntrl:]' `
blcli Server setPropertyValue $KEY TEST_ENC_PROP $VAL
Return type : com.bladelogic.om.infra.model.server.Server
Command Input :
Variable Name | Variable Type | Description |
---|---|---|
serverKey | DBKey | Handle to the server. |
propertyName | String | Name of the property. |
valueAsString | String | The value to set. |
Example
This example script assumes that a server key is present in the CLI variable server_key. It also assumes that a property called is_approved has been defined in the Server property class.
Script
Server setPropertyValue $server_key is_approved true