Jump to content

Recommended Posts

Posted

Hi,

I'm currently using this script to generate an array called $usernames which just contains the members of an AD group:

#include <Array.au3>

$objGroup = ObjGet("LDAP://cn=just_a_group,ou=groups,dc=here,dc=com")
$objGroup.GetInfo
$arrMemberOf = $objGroup.GetEx("member")
Local $usernames[UBound($arrMemberOf)]
For $i = 0 To UBound($arrMemberOf) - 1
    $usernames[$i] = $arrMemberOf[$i]
Next

It works fine, but I never wrote it and I'd normally use the AD udf to do it.  But I've tried and failed!  How would I do the above with the AD udf?

Thanks,

Graybags

Posted

Please have a look at function _AD_GetGroupMembers:  Returns an array of group members.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted
  On 5/3/2024 at 2:11 PM, water said:

Please have a look at function _AD_GetGroupMembers:  Returns an array of group members.

Expand  

That was one of the first things I tried, but it didn't work, just gave me a -1 error.

Posted

The only error _AD_GetGroupMembers returns is 1 - Specified group does not exist.
Can you please provide the full code you run that returns this error?

My UDFs and Tutorials:

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

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