Can some post the way to know if a particular user is a deactivated user in the windows ad ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re on .NET 3.5 or can upgrade to .NET 3.5 – have a look at the new
System.DirectoryServices.AccountManagementnamespace which makes lots of these operations a breeze. See Managing Directory Security Principals in the .NET Framework 3.5 for an intro.In your case, you could write your code something like this:
That’s all there is! Most of those everyday operations on users and groups have been vastly improved with .NET 3.5 – use those new capabilities!