1,397 posts in this topic
AD - Active Directory UDF
Extensive library to control and manipulate Microsoft Active Directory.
Threads: Development - General Help & Support - Example Scripts - Wiki
BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort
Active Directory UDF - Help & Support (III)
As the Active Directory UDF - Help & Support thread has grown too big, I start a new one.
The original thread can be found here.
Search user in AD
I've been playing with the AD UDF (by water) and I'm really not sure how it works (even after playing for several hours) and I'm hoping that someone can point me in the right direction on this.
What I want to do is make it so if I give a network username, it returns back the information about said user (IE name, org, dept, etc). I know the info is in AD, I just don't know how to pull it using the UDF. Anyone have suggestions?
Stale Computer Search Yields Computers That Do Not Exist In Active Directory
I have a script to search Active Directory for stale computers within a given OU. The search yields computer names that do not exist in Active Directory. Could mixed mode Active Directory be causing this? I've included a portion of my script to show that it is probably not a problem with the script. However, since I am using AutoIt to do the search I thought I should post my question here.
_AD_Open() For $iLine_Count = 1 to $iNumber_Of_Lines $sOU = FileReadLine($sOU_List, $iLine_Count) $aComputers = _AD_GetObjectsInOU($sOU, "(objectclass=computer)", 2, "name") For $iCount = 0 To UBound($aComputers, 1) - 1 $sSAM_Account_Name = $aComputers[$iCount] & "$" $sHostName = StringTrimRight($sSAM_Account_Name, 1) $sLast_Logon_Date = _AD_GetLastLoginDate($sSAM_Account_Name) $sYear = StringTrimRight($sLast_Logon_Date, 10) $sMonth = StringMid($sLast_Logon_Date, 5, 2) ; "string", start, count $sDay = StringMid($sLast_Logon_Date, 7, 2) If $sYear < 2015 Then If StringLen($sHostName) > 3 Then FileWriteLine($sStale_Host_List, $sHostName) EndIf Next Next _AD_Close()
ADAT - Active Directory Administration Tool
ADAT is a tool to simplify common AD administration tasks. Every administration task has its own tab. It is easy to add new functions (tabs) to the tool. Some often used functions are already available: list users, computers, OUs. File ADAT.ini can be customized to hold the AD logon information if necessary.