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
If the object has been declared as a plain IADs object, the allowable values are: ADsPath, Class, GUID, Name, Parent
If the object has been declared as, say, IADsDomain (which is inherited from IADs) then allowable values are those shown above and the names of the properties of the IADsDomain object, for example, "PasswordHistoryLength".
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