[This is preliminary documentation and subject to change]

### PutEx

The ADSI PutEx method sets the value for a single-valued or multivalued metabase property in the object. You can use PutEx to remove, or clear, a property from a metabase key.

###### Syntax

object.PutEx controlcode, property, value

###### Parts

object
  Contains an IIS Admin Object, usually as a result of a previous GetObject operation.
controlcode
  Specifies whether to update the property, or to remove the property from the object. One of: ADS_PROPERTY_CLEAR (value 1) to remove the property, or ADS_PROPERTY_UPDATE (value 2) to update the property.
property
  A property of the object that has been retrieved from the metabase.
value
  The value for the property. An empty string when removing the property (controlcode = ADS_PROPERTY_CLEAR).

###### Remarks

For a metabase property to use inherited data at a key, the property must not already exist at the key; if it does, you can remove it by using ADS_PROPERTY_CLEAR. (You can use the GetDataPaths method common to all IIS Admin Objects to locate the keys where a property exists.)

###### Code Example

    <%
      Dim IIsObj, vList
      Set IIsObj = GetObject("IIS://LocalHost/W3SVC/Info")
    'Get the value from the object.
      vList = IIsObj.GetEx("CustomErrorDescriptions")
    'Modify the list.

    'Put the values back in the object.
      IIsObj.PutEx 2, "CustomErrorDescriptions", vList
    'Remove another property from the object.
      IIsObj.PutEx 1, "ObsoleteProperty", ""
      IIsObj.SetInfo
    %>

###### See Also

GetInfo, SetInfo, Get, Put, GetEx

© 1997-2001 Microsoft Corporation. All rights reserved.