Active Directory Domain Services Trust Management Technology Sample

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

This sample demonstrates how to manage the Active Directory trust. This sample is available only in Visual C#.

Note Note

This sample uses fictitious values and cannot be run until modified with real values.

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

To customize the sample for your settings

  • Modify the following string variables with real values in the Program.cs file:

    • sourceName

    • sourceUserName

    • sourceUserPassword

    • sourceUserDomain

    • targetName

    • targetUserName

    • targetUserPassword

    • targetUserDomain

    • excludedTopLevelName1

The build the sample

  1. Open a Command Prompt window and navigate to the TrustManagement\CS directory. For information about required settings and the SDK Command Prompt, see How to: Set Sample Settings.

  2. Type msbuild trustmanagement.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 trustmanagement and press Enter.

Note Note

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

This sample performs the following:

  • Creates the trust.

  • Changes an attribute.

  • Verifies trust relationship.

  • Updates the trust direction, gets the relationship, and verifies the new trust direction.

  • Lists forest trust information.

  • Modifies an excluded top level name.

  • Repairs the trust.

  • Deletes the trust.