Jump to content

JackyMB

Members
  • Posts

    6
  • Joined

  • Last visited

About JackyMB

  • Birthday 07/27/1961

Profile Information

  • Location
    AIX en PROVENCE

Recent Profile Visitors

416 profile views

JackyMB's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. with this code : Func _ReadAllObject1($sFqdnOU) Dim $aObjectAll ConsoleWrite( $sFqdnOU & @CRLF) ; 1 <============ $sFilter = "(objectcategory=user)" ;~ $sFilter = "(objectcategory=Computer)" _AD_OPEN($sUserName, $sUserPwd, "","", $sFqdnOU) $aObjectAll = _AD_GetObjectsInOU($sFqdnOU, $sFilter, 2, "sAMAccountName,displayname", "sAMAccountName") _ArrayDisplay($aObjectAll,"$aObjectAll") ConsoleWrite( @error & @CRLF) _AD_Close() EndFunc ;==> _ReadAllObject1 _AD_GetObjectsInOU I did a mistake : C:\zJMBOutils\_Dev\_AutoIt\MyInclude\AD1.au3 (1213) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $aAD_Objects[$iCount2][$iCount1 - 1] = $oAD_RecordSet.Fields($aAD_DataToRetrieve[$iCount1] ).Value ^ ERROR if I comment out the first consolewrite : Error code is 1
  2. Hi Walter, I made test with the code below, it returns me well all the elements Func _ReadAllObject($sFqdnOU) Dim $oAD_RecordSet, $sDN, $oUser, $iCpt $sFilter = "(objectcategory=user)" ;~ $sFilter = "(objectcategory=Computer)" Local $sAttributes = "distinguishedName" _AD_OPEN($sUserName, $sUserPwd, "","", $sFqdnOU) $oAD_Command.CommandText = "<LDAP://" & $sFqdnOU & ">;" & $sFilter & ";" & $sAttributes & ";subtree" $oAD_RecordSet = $oAD_Command.Execute While Not $oAD_RecordSet.EOF $sDN = $oAD_RecordSet.Fields("distinguishedName").Value $oUser = ObjGet("LDAP://" & $sDN) ;~ ConsoleWrite( $sDN & @CRLF) $iCpt += 1 $oAD_RecordSet.MoveNext WEnd _AD_Close() ConsoleWrite( $iCpt & @CRLF) EndFunc ;==> _ReadAllObject For orders were that of ADSI Property Type Default ----------------------------------------------------------------------------- "Asynchronous" BOOLEAN FALSE "deref Aliases" BOOLEAN FALSE "Size Limit" Integer (0)No Limit "Time Limit" Integer None (0) "Column Names Only" BOOLEAN FALSE "SearchScopes" 0 (Base), 1 (onelevel), 2 (subtree) 2 (Subtree) "Timeout" Integer None (0) "Page Size" Integer None (0) "Time Limit" Integer None (0) "Chase Referrals" BOOLEAN FALSE "Cache Results" BOOLEAN TRUE A function would be nice to run before _AD_OPen (ex _AD_Init) but can be run with default setting in case it does not execute Jacky
  3. Hi Wlater, Thank you for the reply. I can wait the next version of the UDF I have no information on AD, Exchange 2007 and later, because in my organization we have exchange 2003.
  4. Thank you for the UDF. I need to make a complete extration AD (> 19,500 users). when I use: _AD_GetObjectsInOU me it does not return the set. Whereas with the CODE below, I am full users: Func _ReadAD($sQuery,$sFilter) Dim $oCmd, $oCnx, $oRSAD Dim $sDN, $oUser, $iCpt, $sUser, $icptclean Local $sAttributes = "distinguishedName" $oCnx = ObjCreate("ADODB.Connection") $oCnx.Provider = "ADsDSOObject" $oCnx.Open = "Active Directory Provider" $oCmd = ObjCreate("ADODB.Command") $oCmd.ActiveConnection = $oCnx $oCmd.Properties ("Page Size") = 1000 $oCmd.Properties ("Size Limit") = 5000 $oCmd.Properties ("Timeout") = 30 $oCmd.Properties ("Cache Results") = False $oCmd.Properties ("searchscope") = 2 ;$ADS_SCOPE_SUBTREE $oCmd.CommandText = "<LDAP://" & $sQuery & ">;" & $sFilter & ";" & $sAttributes & ";subtree" $oRSAD = $oCmd.Execute $oRSAD.MoveFirst While Not $oRSAD.EOF ;~ ConsoleWrite( $oRSAD.Fields(0).Value & @CRLF) $sDN = $oRSAD.Fields("distinguishedName").Value $oUser = ObjGet("LDAP://" & $sDN) ;~ ConsoleWrite( $sDN & @CRLF) _ArrayAdd($aUsers,$oUser) $oRSAD.MoveNext WEnd _Arraydisplay($aUsers,'$aUsers') $oCnx.Close EndFunc ;==>_ReadAD I have so 2 questions: 1) Is it possible to modify the UDF to change the properties 2) could be incles functions for mailbox: _ADAddAccountToMailboxRights _AD_GetMailboxPerms _AD_RemoveMailboxRights Who were in: adfunctions.au3 thank you in advance for any answers
  5. I remove AutoLib from AutoIT version I installaed last beta v3.2.3.2 I re-installed AutoLib in beta version directory Run in beta version = is OK Thank You PaulIA
  6. Hi, I'm using Windows XP Pro SP2, AutoIt 3.2.2.0, Scite 1.72 and the Auto3Lib dated 04/04/2007 I test Header control with listing in help file and i receive this message : C:\ZJMBOU~1\_Dev\_AutoIt3\AutoIt3\Include\A3LWinAPI.au3 (990) : ==> AutoIt has encountered a fatal crash as a result of: Unable to execute DLLCall.: $aResult = DllCall("Kernel32.dll", "int", "FormatMessageA", "int", $iFlags, "hwnd", $pSource, "int", $iMessageID, "int", $iLanguageID, "ptr", $pBuffer, "int", $iSize, "ptr", $vArguments) Help Me ! Excuse my english, i'm french Best regards
×
×
  • Create New...