Jump to content

DaveR

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by DaveR

  1. adfunctions.au3 code that is being used: CODEFunc _ADHasFullRights($object, $user = @UserName) Dim $hfr_groups If $user = @UserName Then $hfr_groups = $loggedonusergroups Else _ADGetUserGroups($hfr_groups, $user) EndIf $oObject = ObjGet("LDAP://" & $strHostServer & "/" & $object) If IsObj($oObject) Then $security = $oObject.Get ("ntSecurityDescriptor") $dacl = $security.DiscretionaryAcl For $ace In $dacl $trusteearray = StringSplit($ace.Trustee, "\") $trusteegroup = $trusteearray[$trusteearray[0]] For $i = 0 To UBound($hfr_groups) - 1 If StringInStr($hfr_groups[$i], "CN=" & $trusteegroup) And $ace.AccessMask = 983551 Then Return 1 Next Next EndIf $oObject = 0 $security = 0 $dacl = 0 Return 0 EndFunc ;==>_ADHasFullRights My code to call on this function: CODEdim $testarray _ADGetObjectsInOU($testarray,"ou=***,ou=***,dc=***,dc=***","(objectClass=Grou)",2,"distinguishedName","distinguishedName") dim $cntGrps = Ubound($testarray) For $i = 1 to $cntGrps if ($i > 300) then MsgBox (1,$i,$testarray[$i] ;This was put in place to be able to see where the error cut out $isAdm = _ADHasFullRights($testarray[$i], @UserName) if ($isAdm = 0) then _ArrayDelete($testarray, $testarray[$i]) Next _ArrayDisplay($testarray) Thanks again for any help or advice.
  2. Hello, While I obtain a number of groups (84) for a user, when I run this portion of the script it appears that the script runs through 4 times. I'm not sure if this why this is happening and I can't display what is contained in any of the objects (I'm faily new to autoit and haven't been able to find a command to do this yet). Is it normal that the script would run through my array 4 times? When I have more groups in my array (612) I get an error after 306 passes stating that the array has an incorrect number of subscripts or subscript range exceeded: Any help or suggestions would be appreciated. Thank you
  3. I figured out my issue with this portion of the script. Appears I was missing part of my ou path. Also, I was unable to scan directly from the DC, I seemed to have to specify an ou.
  4. You are not alone. I am currently having the exact same error. Not sure what might be causing the issue but I'm hoping that someone might have soemthing new to add. Thanks.
  5. Hello, Would it be possible to have access to the source code of GimageX? I would like to add (or have added) a check box in the apply tab that would format the destination drive before deploying the .wim source. Could you please let me know if this is possible? Thank you, DaveR
×
×
  • Create New...