<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

AttributeTypeDescriptionRequired
propnamestring The name of the property to set. False
propvaluestring The new value of the property. False
pathstring The ADSI path of the location where we want to work with. True
failonerrorbool Determines if task failure stops the build, or is just reported. The default is true. False
ifbool If true then the task will be executed; otherwise, skipped. The default is true. False
unlessbool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbosebool Determines whether the task should report detailed build log messages. The default is false. False

Nested Elements:

<properties>

<option>

Represents an option.

Parameters

AttributeTypeDescriptionRequired
namestring Name of the option. True
ifbool 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
unlessbool 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
valuestring Value of the option. The default is a null reference (Nothing in Visual Basic). False
</option>

</properties>

Examples

Requirements

Assembly: NAnt.Contrib.Tasks (0.92.4509.0)