Jump to content

Active Directory Help


 Share

Recommended Posts

Hi,

I am wondering if anyone has done this before with AutoIt or a similar scripting language.

I need to connect to the Active Directory server and fetch user information from the AD. I am basically creating an application that lets the user type in a login name and validate it with the Active Directory to see if it exists before continuing.

Is that ever doable with AutoIt??

Thanks for the help. Greatly appreciated.

the123punch

Link to comment
Share on other sites

Hi,

I am wondering if anyone has done this before with AutoIt or a similar scripting language.

I need to connect to the Active Directory server and fetch user information from the AD. I am basically creating an application that lets the user type in a login name and validate it with the Active Directory to see if it exists before continuing.

Is that ever doable with AutoIt??

Thanks for the help. Greatly appreciated.

the123punch

There are more complex things you can do, but the basic reference would be:
$strDomain = "MyDomain"
$strAccount = "UserName"
$objUser = ObjGet("WinNT://" & $strDomain & "/" & $strAccount & ",user")
If IsObj($objUser) Then 
    MsgBox(64, "Exists", "User " & $strDomain & "\" & $strAccount & " exists")
Else
    MsgBox(16, "Non-Existing", "User " & $strDomain & "\" & $strAccount & " does not exist")
EndIf

LDAP could be used instead of WinNT for the WMI interface, you could query for other object types with the same name, limit the search to an OU, etc., etc.

It's all WMI stuff with ADSI.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hi PsaltyDS,

thank you for your prompt response. I kept searching through the forum and I found access to a library specifically designed for the Active Directory (adfunctions.au3) which I downloaded and used its functions and it works perfectly for what I need it to do.

Thanks still for your help and effort. :)

the123punch

Link to comment
Share on other sites

Hi PsaltyDS,

thank you for your prompt response. I kept searching through the forum and I found access to a library specifically designed for the Active Directory (adfunctions.au3) which I downloaded and used its functions and it works perfectly for what I need it to do.

Thanks still for your help and effort. :)

the123punch

Once you have it working with those UDF functions, take the time to open up the UDF file itself and check out how those functions work. Really pushes you up the learning curve!

>_<

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...