Results 1 to 5 of 5

Thread: Export Group Members

  1. #1
    seankil Guest

    Export Group Members

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

  2. #2
    mrdude Guest

  3. #3
    Richard Mueller [MVP] Guest

    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
    --



  4. #4
    seankil Guest

    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
    > --
    >
    >
    >


  5. #5
    Richard Mueller [MVP] Guest

    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
    >> --
    >>
    >>
    >>




Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,639,862.12310 seconds with 17 queries