'LockoutTime'-attribute

  • Thread starter Thread starter Schmidtmayer Marc
  • Start date Start date
S

Schmidtmayer Marc

Hi all,

I need to show the list of users and indicate whether the users are
'locked out' or not.
Now I know that to determine if an account is locked out, you need to
look at the lockoutTime on the user object. If it is non-zero, you
must compare the
lockout time value with the lockoutDuration interval that is set for
the
domain and the current time (according to the DC) to see if the
account is
still locked out or not (assuming lockoutTime is non-zero).

BUT ... how do I do this in Visual Basic ??
I'm not a Visual Basic programmer and this one needs to be done in VB
....
Has anyone an example for me or an URL or ...
Any help is welcome !

Thanks,
Marc.
 
Hello

http://www.microsoft.com/technet/scriptcenter/

Has a lot of sample of scripts against AD in VB, there is no one for what
you want to do, but you may can found out how to write your own when you see
threes scripts.

--
Regards
Christoffer Andersson
Microsoft MVP - Directory Services

No email replies please - reply in the newsgroup
 
Hi there,
Thanks for your answers and help !

But I find it strange that no one has a solution.
This means that no one did need to retrieve a list (programmatically)
of users who where/are locked out.
Or no one wants to share his solution ... ;-))

Greetz,
Marc.
 
Howdy, Marc!

Hope that all is well for you in the lovely country of Belgium. Have been
to Bruessels several times and really enjoy the city.

Anyway, I can not script so I am not able to help with a 'programmatical'
solution. There should be some sort of help in a scripting news group. Or
check out the link that Chriss gave you. You might also want to take a look
at http://www.rlmueller.net or http://cwashington.netreach.net for starters.
These two sites have a lot of scripts. You might also want to look at
Robbie Allen's scripting book!

HTH,

Cary
 
If you can use an exe solution, check out my unlock tool. It is at
www.joeware.net on the free win32 tools page. It will tell you all users who are
locked out in a domain.

You can't do this very easily in script, I am not a VB programmer so I can't
help there. I wrote it in c++ but don't share source code. Well I did once
because Kevin Mitnick asked me but you aren't him. :o)

Anyway, you need to calculate the value at which an account could have for
lockoutTime that would be unlocked at the moment in time you are running the
program, then search AD for all accounts that have a lockouttime that is greater
than that value.

joe
 
Hi Cary,

Thanks !
I will surely take a look !

And when you're in Brussels again ... I will buy you a drink ... let me know ! ;-)

Bye,
Marc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top