Export members of dif. admin groups with LDIFDE


G

Guest

Hi!

I would like to export the members of dif. admin groups with LDIFDE.
For now I'm using following:

ldifde -f admins.ldf -s servername -d
"cn=administrators,cn=builtin,dc=domain,dc=se"

Is this the right way to do it or can I filter it better?

Best regards,
Thomas
 
Ad

Advertisements

J

Jerold Schulman

Hi!

I would like to export the members of dif. admin groups with LDIFDE.
For now I'm using following:

ldifde -f admins.ldf -s servername -d
"cn=administrators,cn=builtin,dc=domain,dc=se"

Is this the right way to do it or can I filter it better?

Best regards,
Thomas

Using Adfind.exe freeware from tip 5898 » Freeware ADFind.
in the 'Tips & Tricks' at http://www.jsifaq.com

Xgrp "cn=administrators,cn=builtin,dc=domain,dc=se" admins.ldf

where Xgrp.bat contains:
@echo Off
if {%2}=={} @echo Syntax XGrp "GroupDN" File&goto :EOF
setlocal
set grp=%1
set grp="%grp:"=%"
set file=%2
set adf=adfind -nodn -b %grp% member
for /f "Tokens=1*" %%a in ('%adf%^|find ">member:"') do (
@echo %grp% "%%b">>%file%
)
endlocal

If you use admins.ldf for the next group, Xgrp.bat will append the info.



Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
Ad

Advertisements

C

Cary Shultz [A.D. MVP]

Thomas,

You might want to try something like:

ldifde -f c:\system\admins.ldf -s dc01.yourdomain.com -t 389 -d
"dc=yourdomaiun,dc=com" -r "(objectClass=group)" -p subtree. This will give
you all groups in the Domain. Might not be what you want. You could
replace the -d "dc=yourdomain,dc=com" with something else, such as -d
"OU=xxxxxx,dc=yourdomain,dc=com". You can also use the -l switch ( and that
is a lower case letter "L", not the number 1 ) to specify what you want
returned in the admins.ldf file ( such as DN, sAMAccountName, CN, blah!
blah! blah! ).

--
Cary W. Shultz
Roanoke, VA 24012

WIN2000 Active Directory MVP
http://www.activedirectory-win2000.com
(soon to be updated!!!)
http://www.grouppolicy-win2000.com
(soon to be updated!!!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top