Click here to Skip to main content
15,886,689 members
Articles / Desktop Programming / Win32

Using System.DirectoryServices.AccountManagement

Rate me:
Please Sign up or sign in to vote.
4.88/5 (27 votes)
21 Jul 2009CPOL4 min read 299.4K   8.6K   85  
In this article, we will be focusing on creating, editing, and deleting both user accounts or groups on the Active Directory or Machine SAM by using the System.DirectoryServices.AccountManagement namespace that .NET Framework 3.5 includes.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace AccountManagementGUI
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new frmMain());
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
Turkey Turkey
Tamer Oz is a Microsoft MVP and works as Assistant Unit Manager.

Comments and Discussions