Active Directory Trust Reporting Technology Sample
This sample demonstrates how to retrieve the Active Directory trust information. This sample is available only in Visual C#.
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:
targetDomainName
targetForestName
To build the sample
Open a Command Prompt window and navigate to the TrustReporting\CS directory. For information about required settings and the SDK Command Prompt, see How to: Set Sample Settings.
Type msbuild trustreporting.sln at the command line.
To run the sample
Navigate to the directory that contains the built executable, using the command prompt.
Type trustreporting and press Enter.
Note |
---|
This sample is a console application. You must launch and run it in a Command Prompt window to view its output. |
Remarks
This sample lists the following:
Each domain trust and its properties.
Each forest trust and its properties.
This sample also prompts for the name of a trust and displays its properties.