PantoffelSlippers
asked on
Querying Active Directory group membership information
Good day experts,
I'm trying to query active directory with vbscript to get the membership information of a specific group.
Using an application called dsa.msc I can query this information manually but I need to follow a more automated approach using vbscript.
SO what I need my script to do now, is get all the members for a given group name.
I currently have the following sample:
Set objGroup = GetObject _
("LDAP:// SOMETHING MUST GO HERE")
objGroup.GetInfo
arrMemberOf = objGroup.GetEx("member")
WScript.Echo "Members:"
For Each strMember in arrMemberOf
WScript.echo strMember
Next
I just cannot get the correct parameters specified in the "LDAP:// ..... " command to get results. Surely, if I can access the required info with dsa.msc then I should have all the necessary connectivity, access and info to run this query - I just don't know what to put in.
Please help.
Thanks
Christoff
I'm trying to query active directory with vbscript to get the membership information of a specific group.
Using an application called dsa.msc I can query this information manually but I need to follow a more automated approach using vbscript.
SO what I need my script to do now, is get all the members for a given group name.
I currently have the following sample:
Set objGroup = GetObject _
("LDAP:// SOMETHING MUST GO HERE")
objGroup.GetInfo
arrMemberOf = objGroup.GetEx("member")
WScript.Echo "Members:"
For Each strMember in arrMemberOf
WScript.echo strMember
Next
I just cannot get the correct parameters specified in the "LDAP:// ..... " command to get results. Surely, if I can access the required info with dsa.msc then I should have all the necessary connectivity, access and info to run this query - I just don't know what to put in.
Please help.
Thanks
Christoff
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
Check this too..
[SOLVED] Active Directory Saved Query - Group Member Listing
Hope that helps :)
Check this too..
[SOLVED] Active Directory Saved Query - Group Member Listing
Hope that helps :)
ASKER
I'll try that too.
I'm really struggling with the Powershell.
One of my challenges is that results are written back to a database - that's why I also started with VBScript - easy to update SQL Server...
I'm really struggling with the Powershell.
One of my challenges is that results are written back to a database - that's why I also started with VBScript - easy to update SQL Server...
ASKER
Thanks experts
ASKER