IADsOU Property Methods
The property methods of the IADsOU interface get or set the properties listed in the following table. For more information, see Interface Property Methods.
Properties
-
BusinessCategory
-
-
Access type: Read/write
-
Scripting data type: BSTR
-
// C++ method syntax HRESULT get_BusinessCategory( [out] BSTR* pbstrBusinessCategory ); HRESULT put_BusinessCategory( [in] BSTR bstrBusinessCategory );
A string that contains the general business function or functions performed by the organizational unit, for example "Accounting".
-
-
Description
-
-
Access type: Read/write
-
Scripting data type: BSTR
-
// C++ method syntax HRESULT get_Description( [out] BSTR* pbstrDescription ); HRESULT put_Description( [in] BSTR bstrDescription );
A string that contains a textual description of the organizational unit.
-
-
FaxNumber
-
-
Access type: Read/write
-
Scripting data type: BSTR
-
// C++ method syntax HRESULT get_FaxNumber( [out] BSTR* pbstrFaxNumber ); HRESULT put_FaxNumber( [in] BSTR bstrFaxNumber );
A string that contains the facsimile number of the organizational unit.
-
-
LocalityName
-
-
Access type: Read/write
-
Scripting data type: BSTR
-
// C++ method syntax HRESULT get_LocalityName( [out] BSTR* pbstrLocalityName ); HRESULT put_LocalityName( [in] BSTR bstrLocalityName );
A string that contains the name of the geographic region of the organizational unit.
-
-
PostalAddress
-
-
Access type: Read/write
-
Scripting data type: BSTR
-
// C++ method syntax HRESULT get_PostalAddress( [out] BSTR* pbstrPostalAddress ); HRESULT put_PostalAddress( [in] BSTR bstrPostalAddress );
A string that contains the postal address of the organizational unit.
-
-
SeeAlso
-
-
Access type: Read/write
-
Scripting data type: VARIANT
-
// C++ method syntax HRESULT get_SeeAlso( [out] VARIANT* pvSeeAlso ); HRESULT put_SeeAlso( [in] VARIANT vSeeAlso );
An array of strings that contains the distinguished names of other directory objects which may be relevant to this object.
-
-
TelephoneNumber
-
-
Access type: Read/write
-
Scripting data type: BSTR
-
// C++ method syntax HRESULT get_TelephoneNumber( [out] BSTR* pbstrTelephoneNumber ); HRESULT put_TelephoneNumber( [in] BSTR bstrTelephoneNumber );
A string that contains the telephone number of the organizational unit.
-
Examples
The following code example displays the BusinessCategory and Description of all organization units in a container. It assumes that the underlying directory service supports grouping of directory objects by organization unit.
Dim dom As IADsContainer
Dim ou As IADsOU
' Bind to the container.
Set dom = GetObject("LDAP://server1/domain1")
' Filter out all objects that are not of class "organizationalUnit".
dom.filter = Array("organizationalUnit")
' Enumerate the organizational units in the container and display
' the BusinessCategory and Description properties of each OU.
For Each ou In dom
MsgBox ou.BusinessCategory & ": " & ou.Description
Next
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |
Header |
|
DLL |
|
IID |
IID_IADsOU is defined as A2F733B8-EFFE-11CF-8ABC-00C04FD8D503 |