Re: enumerating Domain Users Group
From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 02/25/04
- Previous message: Al Dunbar [MS-MVP]: "Re: one more question about group membership testing..."
- In reply to: Chris Jones: "enumerating Domain Users Group"
- Next in thread: Chris Jones: "Re: enumerating Domain Users Group"
- Reply: Chris Jones: "Re: enumerating Domain Users Group"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 24 Feb 2004 20:51:10 -0700
"Chris Jones" <anonymous@discussions.microsoft.com> wrote in message
news:2CFEE60F-B150-4BAB-902C-878DE7079D5E@microsoft.com...
> I am using the below script to enumerate each user in the Domain Local
group of my domain.
Is it the "domain users" group you are interested in (as suggested by the
binding string) or something called "the Domain Local group"?
> When trying to enumerate the group, I get no results back when doing a
wscript.echo groupmember.cn. However, if I change my user group to
something else, the script works like a champ.
To clarify, you change the binding string to reference a different group,
leaving the loop the same?...
> Does anybody have any suggestions on this? Does anybody know of any
reasons why I cannot enumerate the group?
... but below you seem to suggest that you can enumerate the group, just
cannot seem to display the members' CN properties...
>
> If I look at the group with the Domain Users and Computers mmc, the group
is populated as you would expect. Thanks in advance for any help! When I
echo out the adspath, the ldap path is correct.
And by this, you mean that you change the loop to echo groupmember.adspath
instead of groupmember.cn? If that is the case, I am not sure what the
problem is... Sorry.
/Al
>
> Option Explicit
> Dim oGroup, groupmember
> Set oGroup = GetObject("LDAP://cn=domain
users,cn=Users,dc=MyDomain,dc=root")
> wscript.echo ogroup.adspath
> For Each groupmember In ogroup.members
> wscript.echo groupmember.cn
> Next
- Previous message: Al Dunbar [MS-MVP]: "Re: one more question about group membership testing..."
- In reply to: Chris Jones: "enumerating Domain Users Group"
- Next in thread: Chris Jones: "Re: enumerating Domain Users Group"
- Reply: Chris Jones: "Re: enumerating Domain Users Group"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|