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.

To set the default value of a property of type property class (for example a class named 'MY_CLASS') to an instance of the MY_CLASS property class, use the following syntax:

KEY=`blcli Server getServerDBKeyByName server1`
blcli Server setPropertyValue ${KEY} MY_PROP "Class://SystemObject/MY_CLASS/MY_PSI"

where MY_PSI is a property instance of the MY_CLASS property class.

For encrypted property types, you can use the BMC BladeLogic blenc encryption utility to encrypt values that 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 :

Command Input :

Variable Name

Variable Type




Handle to the server.



Name of the property.



The value to set.


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.


Server setPropertyValue $server_key is_approved true 

Was this page helpful? Yes No Submitting... Thank you