Advertisement

07.11.2008 at 03:19AM PDT, ID: 23556661
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Check Account Lockout Status with VB - Not quite working!

Asked by inbisit in VB Controls, Lightweight Directory Access Protocol (LDAP), VB Script

Tags: , , ,

Hi,

I've spent hours on google trying to find out how to check if a user account is locked out or not. All it does at the moment is say that all of the accounts are locked out :S even when i know for a fact that they aren't.  Any help would be greatly appreciated.

This is the code i have so far.....

THE FUNCTION
-------------------------------------------------------------------------------------------------------------------------------
 Function IsAccountDisabled()
        Dim objUser
        Dim objConnection
        Dim objCommand
        Dim FindUser
        Dim strUser
        Dim objRecordSet
        Dim Wscript
        Dim strExch
        Dim strMailServer
        Dim strOU
        Dim strOUldap
        Dim strLock
        Dim strLockStatus

        Const ADS_SCOPE_SUBTREE = 2
        'GET USERNAME
        On Error Resume Next
        objConnection = CreateObject("ADODB.Connection")
        objCommand = CreateObject("ADODB.Command")
        objConnection.Provider = "ADsDSOObject"
        objConnection.Open("Active Directory Provider")
        objCommand.ActiveConnection = objConnection

        FindUser = (Username.Text)
        If FindUser = "" Then
            MsgBox("No Username enter, Exiting Script", MsgBoxStyle.OkOnly, "Nothing Entered")
        Else
            strUser = FindUser
        End If

        objCommand.Properties("Page Size") = 1000
        objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE


        objCommand.CommandText = "SELECT distinguishedName FROM 'LDAP://dc=sirrus,dc=com'WHERE objectCategory='user'AND sAMAccountName='" & strUser & "'"
        objRecordSet = objCommand.Execute
        objRecordSet.MoveFirst()
        Do Until objRecordSet.EOF
            objUser = (objRecordSet.Fields("distinguishedName").Value)
            objRecordSet.MoveNext()
        Loop
        IsAccountDisabled = objUser.AccountDisabled
End Function
--------------------------------------------------------------------------------------------------------------------


The bit to actually put a value in a text box...

--------------------------------------------------------------------------------------------------------------------
        'GET AND DISPLAY LOCKOUT STATUS
        If IsAccountDisabled(objUser) Then
            AccountLock.Text = "ACCOUNT LOCKED"
        Else
            AccountLock.Text = "No"
        End If
--------------------------------------------------------------------------------------------------------------------


I'll admit.. this is my first ever attempt at doing anything with Visual Basic and i'm quite shocked i got the rest of the user information to display... it's just this one thing keeps showing that all of the accounts i enter are locked out.Start Free Trial
[+][-]07.13.2008 at 03:32AM PDT, ID: 21991924

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.13.2008 at 03:33AM PDT, ID: 21991927

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.13.2008 at 02:30PM PDT, ID: 21994288

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 03:00AM PDT, ID: 21996783

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 05:53AM PDT, ID: 21997585

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.14.2008 at 06:52AM PDT, ID: 21998001

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 06:56AM PDT, ID: 21998028

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.14.2008 at 07:28AM PDT, ID: 21998375

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 10:32AM PDT, ID: 22000192

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.15.2008 at 05:17AM PDT, ID: 22006101

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 05:41AM PDT, ID: 22006289

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.15.2008 at 06:01AM PDT, ID: 22006453

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 06:05AM PDT, ID: 22006485

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.15.2008 at 06:24AM PDT, ID: 22006688

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 06:27AM PDT, ID: 22006718

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 06:37AM PDT, ID: 22006825

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.15.2008 at 06:38AM PDT, ID: 22006837

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 06:40AM PDT, ID: 22006857

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 06:44AM PDT, ID: 22006887

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.15.2008 at 06:48AM PDT, ID: 22006928

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.15.2008 at 06:54AM PDT, ID: 22006997

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 06:56AM PDT, ID: 22007011

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 06:56AM PDT, ID: 22007017

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.15.2008 at 06:57AM PDT, ID: 22007029

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.15.2008 at 07:03AM PDT, ID: 22007082

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 07:13AM PDT, ID: 22007170

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 07:16AM PDT, ID: 22007210

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Controls, Lightweight Directory Access Protocol (LDAP), VB Script
Tags: Microsoft, Visual Basic Express, 2005, VB Code
Sign Up Now!
Solution Provided By: purplepomegranite
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.15.2008 at 07:27AM PDT, ID: 22007330

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 07:30AM PDT, ID: 22007357

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 07:37AM PDT, ID: 22007424

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 07:39AM PDT, ID: 22007444

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 01:08AM PDT, ID: 22014038

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628