reading userAccountControl flags
- From: "Morten" <morten_skovgaard@xxxxxxxxxxx>
- Date: Thu, 9 Mar 2006 14:20:43 +0100
Hi!
I'm trying to determine if an AD user has the "Password never expires" flag
set. I've only been able to find some vb script examples that show how to do
this but I haven't been able to translate this to C#.
I've tried this:
if ((dirEntry.Properties["userAccountControl"].Value &&
UF_DONT_EXPIRE_PASSWD) == 0)
but that results in an error: Operator '&&' cannot be applied to operands of
type 'object' and 'int'
Can someone help with this?
Thanks in advance
Morten
.
- Follow-Ups:
- Re: reading userAccountControl flags
- From: Willy Denoyette [MVP]
- Re: reading userAccountControl flags
- Prev by Date: Programatically finding SMTP Server on local network
- Next by Date: Re: Sockets and Buffer size
- Previous by thread: Programatically finding SMTP Server on local network
- Next by thread: Re: reading userAccountControl flags
- Index(es):
Relevant Pages
|