Dashier sollte klappen (nachdem in der SB genau erklärt wurde was du machen willst
das nächste mal bitte eine ausführlichere Beschreibung des Problems angeben :))
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#include <AD.au3>
#include <Array.au3>
#include <GuiListView.au3>
Global $SDNSDomain, $SHostServer, $SConfiguration, $SPassword, $SUserId, $aTEMP, $status, $statusleiste, $templeer, $sType, $homenrtemp
[/autoit] [autoit][/autoit] [autoit]; Username+Passwort fuer Domainadmin
$SUserId = ""
$SPassword = ""
; Open Connection to the Active Directory
_AD_Open()
$SDNSDomain = $sAD_DNSDomain
$SHostServer = $sAD_HostServer
$SConfiguration = $sAD_Configuration
_AD_Close()
; Open Connection to the Active Directory
If _AD_Open($SUserId, $SPassword, $SDNSDomain, $SHostServer, $SConfiguration) Then
ElseIf @error <= 8 Then
MsgBox(16, "Adressbuch AD-Tool", "The logon was not succcessful!" & @CRLF & @CRLF & "@error: " & @error & ", @extended: " & @extended)
Else
MsgBox(16, "Adressbuch AD-Tool", "The logon was not succcessful!" & @CRLF & @CRLF & "@error: " & @error & ", @extended: " & @extended & _
@CRLF & @CRLF & "Extended error information will be displayed")
Global $aError = _AD_GetLastADSIError()
_ArrayDisplay($aError)
EndIf
Global $sOU = "OU=Mitarbeiter XXX,DC=xxx,DC=de"
[/autoit] [autoit][/autoit] [autoit]Global $aObjects[1][1]
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]$aObjects = _AD_GetObjectsInOU($sOU, "(name=*)", 2, "displayname,sAMAccountName")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 192, 124)
$wnamen = GUICtrlCreateListView("Name|Windows Anmeldename", 104, 24, 209, 383)
For $I = 0 to Ubound ($aObjekts) -1
GUICtrlCreateListViewItem ($aObjekts[$i][0]& "|"&$aObjects[$i][1] , $wnamen)
Next
$OK = GUICtrlCreateButton("OK", 368, 272, 121, 97, $WS_GROUP)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $OK
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]_ArrayDisplay($aObjects, "Active Directory Functions - Example 1 - Objects in OU '" & $sOU & "'")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]EndSwitch
WEnd