IADs Method: Get

Get
(

PropertyName As String

) As Variant;

Parameters

[in] String PropertyName
Specifies the name of the property of the object. The name is case sensitive and must be enclosed in double quotes. Allowable values for PropertyName depend on the kind of IADs object.

Description
This method gets the value of a specified property.

Allowable Values

Example
Consider the PasswordHistoryLength property of the Domain object. This is of type Long. The following lines of Visual Basic code get the value for this property using the Get method.

Dim HistoryLength As Long
Dim VarArg As Variant
Dim Domain As IADsDomain
'Get the domain object (assuming that MSFT is a valid domain)
Set Domain = GetObject("NTDS://MSFT")
VarArg = Domain.Get("PasswordHistoryLength")
HistoryLength = VarArg ' assign the VarArg to a variable of type Long
Debug.Print "HistoryLength = " & HistoryLength

 

See Also