Udostępnij za pośrednictwem


DSML Batch Request Technology Sample

This sample demonstrates batch directory operations using Directory Services Markup Language (DSML) Services and the DsmlSoapHttpConnection and DsmlRequestDocument classes. This sample is available only in Visual C#.

For information about using the samples, see the following topics:

To build the sample

  1. Open a Command Prompt window and navigate to the BatchRequest\CS directory.

  2. Type msbuild batchrequest.sln at the command line.

To run the sample

  1. Navigate to the directory that contains the built executable file, using the command prompt.

  2. Type batchrequest by its arguments and press Enter.

This sample has the following syntax:

BatchRequest <dsmlServer> <user> <pwd> <domain> <targetOU>
  • dsmlServer
    The server.

  • user
    Your user name.

  • pwd
    Your password.

  • domain
    The Active Directory domain.

  • targetOU
    The target organizational unit (OU).

Here is an example:

batchrequest http://myDC1.testDom.fabrikam.com/dsml/adssoap.dsmlx  user1  secret@~1 testDom OU=samples,DC=testDom,DC=fabrikam,DC=com

Note

This sample is a console application. You must start and run it in a Command Prompt window to view its output.

Remarks

This sample defines the following methods.

Method

Description

CreateConnection

Connects to the server using a DsmlSoapHttpConnection.

SendBatchRequeset

Creates a batch request using DsmlRequestDocument for three sample OUs.