# <adsisetprop>

[This is preliminary documentation and subject to change.]

Sets a property on an ADSI object.

This task uses a heuristic to determine the type of the property in ADSI. The following cases are notable: If the property does not exist on the item, it is inserted as a string.If the property already exists, this method will attempt to preserve the type of the property. The types this method knows about are String, Boolean, and Int32.If the property exists and is an array, the value is added to the array, but only if it is not already present.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
propname | string | The name of the property to set. | False
propvalue | string | The new value of the property. | False
path | string | The ADSI path of the location where we want to work with. | True
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False
unless | bool | Opposite of `if`. If false then the task will be executed; otherwise, skipped. The default is false. | False
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False

### Nested Elements:

#### <properties>

##### <option>

Represents an option.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
name | string | Name of the option. | True
if | bool | Indicates if the option should be passed to the task. If true then the option will be passed; otherwise, skipped. The default is true. | False
unless | bool | Indicates if the option should not be passed to the task. If false then the option will be passed; otherwise, skipped. The default is false. | False
value | string | Value of the option. The default is a null reference (Nothing in Visual Basic). | False

##### </option>

#### </properties>

### Examples

-     <adsisetprop path="${iis.path}/Root" propname="AuthAnonymous" propvalue="true" />

-     <adsisetprop path="${iis.path}/Root/GWSSample">
          <properties>
              <option name="AuthBasic" value="false" />
              <option name="AuthNTLM" value="true" />
          </properties>
      </adsisetprop>

### Requirements

Assembly: NAnt.Contrib.Tasks (0.93.5002.0)