![]() |
||
![]() |
![]() |
|
Samples Sorted by Development Platforms For complete list, please browse the ADSI samples directory. Getting Started Samples Getting Started Samples can be found in here. The source codes can be found in samples/start.
Application Samples Some samples listed below is actually working applications. Samples Sorted by Providers ( or Technologies )
Samples Highlighting ADSI Interfaces, APIs, and Technologies Technologies Interfaces APIs
Samples can also be found in the sample directory and Active Directory Page.
ADsCmd A C++ sample code demonstrates Enumerator and Filtering by getting a list of attributes from the schema and displaying attributes on an object. Usage: adscmd [list|dump] <ADsPath> Examples: adscmd dump WinNT://MYDOMAIN adscmd list LDAP://dc01/CN=Administrators, OU=Admin, DC=MyDomain, DC=Com
ADQI ADQI allows you to find out all ADSI related interfaces supported for a given ADsPath. You can, then, use the interfaces to further manipulate the object. DsSrch A command line executable, highlighting IDirectorySearch usage complete with the Preference option. Usage: dssrch /b <baseObject> /f <search_filter> [/f
<attrlist>] [/p <preference>=value>] [/u <UserName> <Password>]
[/t<flagName>=<value>
Value dssrch /b NDS://ntmarst/ms /f "(object Class=*)"
/a "ADsPath, name, description" /p searchScope=onelevel /p searchscope=onelevel
ADSI Dump An application that traverse a tree, visit each object in a tree and getting the attributes on each object. All actions are recorded in a log file. Written using C++/ATL. Usage: ADO Query It demonstrates ADO Query against LDAP provider. Only ADSI providers that support IDirectorySearch and OLE DB can work with ADO. ADSI 2.5 ships two providers that are aware of OLE DB: LDAP and NDS.
Active
Directory Windows Address Book The Windows address book searches and displays users, groups, and contacts in Active Directory. It showcases the Active Directory search based on ambigious name resolution (ANR). It also demonstrates ADSI search using ADO against Active Directory. To run the samples, first you must move the global.asa (or append the existing global.asa) to the default web site directory.\ Active
Directory: Add Group Add Windows 2000 Group under a container. The group can be security or distribution list type, other option is the group type for Universal, Global and Domain Local groups. Active
Directory: Attributes The sample demonstrates how to find attributes by indexed value, GC replication and by type. Active
Directory: Bind To Parent This program find a user and display the user's container. Active
Directory: Computer Creating a user under a specified container. It requires to specify the user's Relative Distinguished Name and Downlevel Name. Active
Directory: Create User Creating a user under a specified container. It requires to specify the user's Relative Distinguished Name and Downlevel Name. Active
Directory: Credentials Logon to the current domain with the alternate credentials. Active
Directory: GC All Users Searching a user in the forest by searching the Global Catalog. Active
Directory: Get Domain Mode The sample checks if Active Directory is in mixed or native mode. Active
Directory: Schema Info This program queries schema for the specified classes or attributes. Active
Directory: Guid Binding Active Directory allows you to bind object by GUID. This sample demonstrates it. Active
Directory: Well Known Guid Active Directory has a concept of Well Known GUID. It's a well known place, normally a container, which is associated with a well known GUID. Active
Directory: Property List It demonstrate the use of PropertyList in Active Directory. Active
Directory: Query Users Finding a user in the current domain. Active
Directory: RootDSE IADsExtension This is a step-by-step tutorial on how to create an ADSI extension. The first step is to create an early binding extension without implementing IADsExtension. The second step implements the IADsExtension to support late binding. This extension will extend a 'user' object on the LDAP provider. You can easily change it to other provider by modifying the DLL Registration code. You can use this source code as a code base for your extension. This sample code accompanies with the client code written in VB.
Mailbox It demonstrate how to create an Exchange Mailbox using Visual Basic. It uses many Win32 APIs to manipulate the security descriptor and SID. Alternatively, you can use the ADSI Resource Tool Kit to create a mailbox.
Rule-Based
Distribution List "All mailboxes in California" or Exchange
Tombstone It shows how to retrieve a tombstone (deleted) object on Exchange Server 5.5
Exchange
Configuration It shows you how to modify Exchange Configuration attributes, such as set the maximum value of message size on an Exchange Server.
Exchange
Search Alias (VBS) Given a alias name, this script will search the alias object for a given Exchange Server name. Exchange
Distribution List This sample demonstrates how to:
Getting
Home-MDB of a Mailbox For a given mailbox, this sample demonstrates how to instantiate its HomeMDB object.
Retrieving
Objects Based on USN-Change Exchange uses USNChange for replication purposes. Now you can try it yourself to find out which objects were changed since last replication (you need to know the USNChange value).
Creating a
Custom Recipient Create a new recipient object in a container. Set the new recipient's attributes such as telephoneNumber, target-address, cn, and so on.
Enumerating
an Exchange Container It enumerates a container and list and categorize persons, custom recipients and distribution lists in that container.
Finding Exchange
Organization Name for a Given Server It demonstrates how to get an Exchange organization name if you know the Exchange Server name.
Displaying and
Modifying Exchange Security Descriptor It shows how to get and set
the Exchange
security descriptor using IADsPropertyValue2.
WinNT
Binding This code snippet illustrates how to bind to a domain, remote computer, or a user in a domain. It also shows how to bind an object with alternate credentials.
WinNT Group Walkthrough Group life cycle management, from group creation (local and global), group enumeration, adding user/group to a group and removing members. WinNT
Computer This sample demonstrates how to bind to a computer object, to enumerate services, sessions, and resources and to create file share. WinNT User This sample demonstrates how to create a user,
set a user's properties, and rename and delete a user. VB source code: samples\WinNT\User\vb A WinNt User Management Application.
WinNT
Change Password
Perl:
Binding
Perl:
Create and Delete Object
Perl:
Retrieve and Modify Properties
ADSI
Provider Installation procedure for the Active DS Sample Provider:
|
|