Click here to Skip to main content
15,881,172 members
Articles / Programming Languages / C#

Active Directory Helper

Rate me:
Please Sign up or sign in to vote.
4.88/5 (10 votes)
10 Apr 2010CPOL2 min read 55.8K   4.6K   55  
A small set of classes for simplifying the access to Windows Active Directory
namespace ActiveDirectoryHelper
{
	/*
	 * Developed 2004-2010 Zeta Software GmbH.
	 * http://www.zeta-test.com
	 * 
	 * Author: uwe.keim@gmail.com - http://twitter.com/UweKeim
	 */

	#region Using directives.
	// ----------------------------------------------------------------------
	using System;

	// ----------------------------------------------------------------------
	#endregion

	/////////////////////////////////////////////////////////////////////////

	/// <summary>
	/// Enumeration of flags that control an user account.
	/// <see href="ms-help://MS.MSDNQTR.2002JUL.1033/netdir/adsi/ads_user_flag_enum.htm"/>
	/// </summary>
	[Flags]
	public enum ADUserFlags
	{
		#region Flags.
		// ------------------------------------------------------------------

		/// <summary></summary>
		Script = 0x0001,
		/// <summary></summary>
		Accountdisable = 0x0002,
		/// <summary></summary>
		HomedirRequired = 0x0008,
		/// <summary></summary>
		Lockout = 0x0010,
		/// <summary></summary>
		PasswdNotreqd = 0x0020,
		/// <summary></summary>
		PasswdCantChange = 0x0040,
		/// <summary></summary>
		EncryptedTextPasswordAllowed = 0x0080,
		/// <summary></summary>
		TempDuplicateAccount = 0x0100,
		/// <summary></summary>
		NormalAccount = 0x0200,
		/// <summary></summary>
		InterdomainTrustAccount = 0x0800,
		/// <summary></summary>
		WorkstationTrustAccount = 0x1000,
		/// <summary></summary>
		ServerTrustAccount = 0x2000,
		/// <summary></summary>
		DontExpirePasswd = 0x10000,
		/// <summary></summary>
		MnsLogonAccount = 0x20000,
		/// <summary></summary>
		SmartcardRequired = 0x40000,
		/// <summary></summary>
		TrustedForDelegation = 0x80000,
		/// <summary></summary>
		NotDelegated = 0x100000,
		/// <summary></summary>
		UseDesKeyOnly = 0x200000,
		/// <summary></summary>
		DontRequirePreauth = 0x400000,
		/// <summary></summary>
		PasswordExpired = 0x800000,
		/// <summary></summary>
		TrustedToAuthenticateForDelegation = 0x1000000

		// ------------------------------------------------------------------
		#endregion
	}

	/////////////////////////////////////////////////////////////////////////
}

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
Chief Technology Officer Zeta Software GmbH
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.

➡️ Give me a tip 🙂

In his free time, he does climbing, running and mountain biking. In 2012 he became a father of a cute boy and in 2014 of an awesome girl.

Some cool, free software from us:

Windows 10 Ereignisanzeige  
German Developer Community  
Free Test Management Software - Intuitive, competitive, Test Plans.  
Homepage erstellen - Intuitive, very easy to use.  
Offline-Homepage-Baukasten

Comments and Discussions