Compartir a través de


Display Security Descriptor Object Technology Sample

This sample shows how to display the security descriptor object for a directory entry.

NoteNote

This sample uses fictitious values and cannot be run until it is 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 DisplaySecurityDescriptorObject.cs or DisplaySecurityDescriptorObject.vb file, depending on which version of the sample is being built:

    • domainADsPath - LDAP path to domain

To build the sample

  1. At a command prompt, navigate to the Technologies\DirectoryServices\DisplaySecurityDescriptorObject directory. Navigate to the CS or VB directory, depending on which version of the sample is being built. For information about required settings and the SDK Command Prompt, see How to: Set Sample Settings.

  2. Type msbuild displaysecuritydescriptorobject.sln at the command prompt.

To run the sample

  1. At a command prompt, navigate to the directory that contains the built executable file.

  2. Type displaysecuritydescriptorobject and press Enter.

NoteNote

This sample is a console application. You must start and run it in a command prompt to view its output.

Remarks

This sample lists the following information:

  • SID of the group to which the directory entry belongs

  • SID of the owner to which the directory entry belongs

  • Access rules information

  • Audit rules information

This sample demonstrates the following tasks: