Active Directory Domain Controller Technology Sample
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
This sample locates domain controllers and global catalogs in the current domain and forest. This sample is available only in Visual C#.
For information about using the samples, see the following topics:
To build the sample
Open a Command Prompt window and navigate to the DomainController\CS directory. For information about required settings and the SDK Command Prompt, see How to: Set Sample Settings.
Type msbuild domaincontroller.sln at the command line.
To run the sample
Navigate to the directory that contains the built executable file, using the command prompt.
Type DomainController and press Enter.
Note
This sample is a console application. You must start and run it in a Command Prompt window to view its output.
Remarks
The sample defines the following methods.
Method |
Description |
---|---|
GCSample |
Finds a global catalog in the current forest and lists its roles and partitions. |
DCSample |
Finds the following domain controller services:
This sample lists their site names, global catalog, and other values. |