Good
point! Thanks.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: 23 May 2006 5:15
To: [email protected]
Subject: RE: [ActiveDir] Group auditI would set the output up for csv output (see -csv) which will make things easier to parse out. Once parsed you should be able to drive the modifications pretty easily.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wyatt, David
Sent: Friday, May 19, 2006 5:18 AM
To: [email protected]
Subject: RE: [ActiveDir] Group auditThanks Joe. I have now used your great adfind tool to find what I'm looking for. Now have one more question on how to use the output.This is a sample output:dn:CN=Group1,OU=Groups,OU=Production,DC=help,DC=comdn:CN=Group5,OU=Groups,OU=Production,DC=help,DC=com>member: CN=Group10,OU=Groups,OU=Production,DC=help,DC=comNow what I need to do is create a script from this that ignores the groups with no members i.e. line one, but adds the member(s) of a group to the group above i.e. add Group10 to Group5Now you're probably wondering why I want to do this when the group is already a member but I want to run this is in a separate AD network where all groups are present but no membership infomation is present.Is this possible?thanksDavid-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: 18 May 2006 23:38
To: [email protected]
Subject: RE: [ActiveDir] Group auditYeah, this is going to have to be a script or custom code.You have the option of using ADSI and enumerating each of the groups and chasing the properties of each group or writing something that calls out to a tool that uses ASQ queries (assumes K3 AD) which would be a world of difference faster.So the ADSI algorithm would beGet group namebind to grouploop through group membersis member a groupyes, then is it a global groupyes, print it outno skipno skipno skipnext groupGo back to startfor using ADSIget group nameASQ query against group's member attribute asking for all global group membersprint membersgo back to startFor an example of an ASQ Query in actionI have a group called HP-OVE-GROUPZ:\>adfind -b "CN=HP-OVE-GROUP,CN=Users,DC=joe,DC=com" member grouptype -samdcAdFind V01.31.00cpp Joe Richards ([EMAIL PROTECTED]) March 2006Using server: 2k3dc02.joe.com:389
Directory: Windows Server 2003dn:CN=HP-OVE-GROUP,CN=Users,DC=joe,DC=com
>member: CN=HP-OVE-User,CN=Users,DC=joe,DC=com
>member: CN=Domain Admins,CN=Users,DC=joe,DC=com
>groupType: -2147483646 [GLOBAL(2);SECURITY(2147483648)]
1 Objects returnedAs you can see there is one obvious global group listed. There are only 2 members so this would be fairly quick in ADSI as well but nowhere near as quick as ASQ because there will only be one query and roundtrip to/from the DC...So I do an ASQ query against the groupZ:\>adfind -b "CN=HP-OVE-GROUP,CN=Users,DC=joe,DC=com" -asq member -f grouptype=-2147483646 name grouptype -samdcAdFind V01.31.00cpp Joe Richards ([EMAIL PROTECTED]) March 2006Using server: 2k3dc02.joe.com:389
Directory: Windows Server 2003dn:CN=Domain Admins,CN=Users,DC=joe,DC=com
>name: Domain Admins
>groupType: -2147483646 [GLOBAL(2);SECURITY(2147483648)]
1 Objects returnedjoe
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wyatt, David
Sent: Thursday, May 18, 2006 8:57 AM
To: [email protected]
Subject: [ActiveDir] Group auditHiI have a text file holding a list of approx 400 global groups such as:Group1Group2Group3Group4etcI need to query the membership to find out which of the above global groups have other global groups as members and then to list the group names, output example:Group1Group10Group2Group12Group14Group3Group4Any ideas?RegardsDavid
****************************************************************************
This message contains confidential information and is intended only
for the individual or entity named. If you are not the named addressee
you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. The sender therefore does not
accept liability for any errors or omissions in the contents of this
message which arise as a result of e-mail transmission.
If verification is required please request a hard-copy version.
This message is provided for informational purposes and should not
be construed as an invitation or offer to buy or sell any securities or
related financial instruments.
GAM operates in many jurisdictions and is
regulated or licensed in those jurisdictions as required.
****************************************************************************
