ADSISetPropertyTask Class

Summary

Sets a property on an ADSI object.
Assembly
NAnt.Contrib.dll
Namespace
NAnt.Contrib.Tasks
Base Types
graph BT Type-->Base0["ADSIBaseTask"] click Base0 "/api/NAnt.Contrib.Tasks/ADSIBaseTask" Base0-->Base1["Task"] Type["ADSISetPropertyTask"] class Type type-node

Syntax

[TaskName("adsisetprop")]
public class ADSISetPropertyTask : ADSIBaseTask

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>

Remarks

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.

Attributes

Type Description
TaskName

Properties

Name Value Summary
Path string
The ADSI path of the location where we want to work with.
Inherited from ADSIBaseTask
PropertyList OptionCollection
PropertyName string
The name of the property to set.
PropertyValue string
The new value of the property.

Methods

Name Value Summary
ExecuteTask() void
Sets the specified property
Initialize() void