Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Export Group Members

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 08-04-2008
seankil
 
Posts: n/a
Export Group Members

How can I export a list of group members from my AD environment
--
SK

Reply With Quote
  #2  
Old 08-04-2008
mrdude
 
Posts: n/a
RE: Export Group Members

http://www.microsoft.com/technet/scr.../adgpvb13.mspx
Reply With Quote
  #3  
Old 08-04-2008
Richard Mueller [MVP]
 
Posts: n/a
Re: Export Group Members

seankil wrote:

> How can I export a list of group members from my AD environment


The script linked in the Microsoft Script Center will reveal the direct
members of a group, except any members that have the group designated as
their "primary" group. It will not reveal membership due to group nesting.

If you want to include all members, including those that are members by
virtue of group nesting, and "primary" group members, you can use this
VBScript program:

http://www.rlmueller.net/List%20Memb...0a%20Group.htm

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--


Reply With Quote
  #4  
Old 09-04-2008
seankil
 
Posts: n/a
Re: Export Group Members

Thanks Richard for the info. I am sorry but my scripting knowledge is zero.
My domain name is nehb.health.gov.ie. The problem i have is trying to
identify the amount of people in a security group called Blue Coat Inet User.
Thanks for any help.
--
SK


"Richard Mueller [MVP]" wrote:

> seankil wrote:
>
> > How can I export a list of group members from my AD environment

>
> The script linked in the Microsoft Script Center will reveal the direct
> members of a group, except any members that have the group designated as
> their "primary" group. It will not reveal membership due to group nesting.
>
> If you want to include all members, including those that are members by
> virtue of group nesting, and "primary" group members, you can use this
> VBScript program:
>
> http://www.rlmueller.net/List%20Memb...0a%20Group.htm
>
> --
> Richard Mueller
> Microsoft MVP Scripting and ADSI
> Hilltop Lab - http://www.rlmueller.net
> --
>
>
>

Reply With Quote
  #5  
Old 09-04-2008
Richard Mueller [MVP]
 
Posts: n/a
Re: Export Group Members

I assume that "Blue Coat Inet User" is the NetBIOS name of the group, also
called the "pre-Windows 2000" name. You don't supply enough information to
determine the Distinguished Name of the group, but you can use the
NameTranslate object to convert the NetBIOS name to the Distinguished Name.

If all you want is a count of the direct members of the group, you can use
the Count property of the Members method of the group object. The code could
be similar to below:
==========
' Constants for the NameTranslate object.
Const ADS_NAME_INITTYPE_GC = 3
Const ADS_NAME_TYPE_NT4 = 3
Const ADS_NAME_TYPE_1779 = 1



' Prompt for (or hard code) the NetBIOS name of the group.

strGroup = InputBox("Enter name of group")



' Determine DNS name of domain from RootDSE.
Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("defaultNamingContext")

' Use the NameTranslate object to find the NetBIOS domain name from the
' DNS domain name.
Set objTrans = CreateObject("NameTranslate")
objTrans.Init ADS_NAME_INITTYPE_GC, ""
objTrans.Set ADS_NAME_TYPE_1779, strDNSDomain
strNetBIOSDomain = objTrans.Get(ADS_NAME_TYPE_NT4)
' Remove trailing backslash.
strNetBIOSDomain = Left(strNetBIOSDomain, Len(strNetBIOSDomain) - 1)



' Use the Set method to specify the NT format of the group name.
objTrans.Set ADS_NAME_TYPE_NT4, strNetBIOSDomain & "\" & strGroup



' Use the Get method to retrieve the RPC 1779 Distinguished Name.
strGroupDN = objTrans.Get(ADS_NAME_TYPE_1779)



' Bind to the group object.

Set objGroup = GetObject("LDAP://" & strGroupDN)



' Output number of direct members of the group.

Wscript.Echo "Number of members: " & objGroup.Members.Count

========

The Count property includes all members, whether users, computers, or
groups. It does not include membership due to nesting. It also does not
include any members that have the group designated as their "primary" group.
By default, the "primary" group of users should be "Domain Users", so if
that has not been changed it is not a problem (unless you want the number of
members of the group "Domain Users").


--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--



"seankil" <seankil@discussions.microsoft.com> wrote in message
news:A7B6937A-9B76-4084-B7B8-4FFDAEE3ADBD@microsoft.com...
> Thanks Richard for the info. I am sorry but my scripting knowledge is
> zero.
> My domain name is nehb.health.gov.ie. The problem i have is trying to
> identify the amount of people in a security group called Blue Coat Inet
> User.
> Thanks for any help.
> --
> SK
>
>
> "Richard Mueller [MVP]" wrote:
>
>> seankil wrote:
>>
>> > How can I export a list of group members from my AD environment

>>
>> The script linked in the Microsoft Script Center will reveal the direct
>> members of a group, except any members that have the group designated as
>> their "primary" group. It will not reveal membership due to group
>> nesting.
>>
>> If you want to include all members, including those that are members by
>> virtue of group nesting, and "primary" group members, you can use this
>> VBScript program:
>>
>> http://www.rlmueller.net/List%20Memb...0a%20Group.htm
>>
>> --
>> Richard Mueller
>> Microsoft MVP Scripting and ADSI
>> Hilltop Lab - http://www.rlmueller.net
>> --
>>
>>
>>



Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Export Group Members"
Thread Thread Starter Forum Replies Last Post
Listing members of Group with >1500 members Umesh Thakur Windows Server Help 11 03-02-2012 05:29 AM
Display members of a group with more than 1500 members Simon G Windows Server Help 5 25-10-2011 12:35 PM
export AD Groups and Members in to Excel. Lion Windows Server Help 3 27-05-2008 12:39 PM
Distribution Groups - export lists and members Isaivalan Active Directory 2 24-07-2007 11:30 AM
Distribution List Members Export BuvDeep Active Directory 3 02-05-2006 07:52 AM


All times are GMT +5.5. The time now is 01:31 AM.