Re: LDIFDE

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Cary Shultz [A.D. MVP] (cwshultz_at_mvps.org)
Date: 04/22/04


Date: Thu, 22 Apr 2004 07:27:00 -0400

Well,

I am thinking that if I gave you one piece of the puzzle I might as well
give it all to you. Sorry for the multiple posts. Anyway, you can do this
for the computer accounts as well as the user accounts. This should give
you three .ldf files and if might be a bit easier for you. Here is the
syntax:

ldifde -f computers.ldf -s servername -t 389 -d "DC=yourdomain,DC=com" -p
subtree - r "(&(objectCategory=computer)(objectClass=user))

This will give you an .ldf file named 'computers.ldf' from which you can see
what computer accounts are in your domain.

ldifde -f users.ldf -s servername -t 389 -d "DC=yourdomain,DC=com" -p
subtree - r "(&(objectCategory=person)(objectClass=user))"

This will give you a third file named 'users.ldf' from which you can see
what user accounts are in your domain.

Just a hint: if you need only specific attributes to be listed in the
output files ( groups.ldf, computers.ldf and users.ldf ) then you can add
the -l switch ( that is the lower case letter 'L' ) at the end of each line
with the specific attributes that you want / need. Here are some examples:

================
ldifde -f groups.ldf -s yourservername -t 389 -d "DC=yourdomain,DC=com" -p
subtree -r "(objectClass=group)" -l "DN,mail,groupType,members"

This will give you the Distinguished Name, the e-mail address associated
with the group ( if applicable ), the type of group ( security /
distribution and local, global, universal ) and the members of that group.

================

ldifde -f computers.ldf -s servername -t 389 -d "DC=yourdomain,DC=com" -p
subtree - r "(&(objectCategory=computer)(objectClass=user)) -l
"DN,sAMAccountName,operatingSystem,operatingSystemVersion,operatingSystemSer
vicePack"

This will give you the Distinguished Name, the 'old stlye name', the
Operating System, the Operating System Version and the Operating System
Service Pack level.

These two examples are what I typically use. You may need / want other
attributes to be included in the output files.

HTH,

Cary

>Cary Shultz [A.D. MVP]" <cwshultz@mvps.org> wrote in message
news:O2N$6kFKEHA.4052@TK2MSFTNGP11.phx.gbl...
> TTS,
>
> My mistake. In my haste I left off a switch. It should have been:
>
> ldifde -f groups.ldf -s yourservername -t 389 -d "DC=yourdomain,DC=com" -p
> subtree -r "(objectClass=group)"
>
> Sorry.
>
> Cary
>
> "Cary Shultz [A.D. MVP]" <cwshultz@mvps.org> wrote in message
> news:eRJXacFKEHA.556@TK2MSFTNGP10.phx.gbl...
> > TTS,
> >
> > If this is not showing any groups then I would suggest that one of three
> > things is happening:
> >
> > 1) you entered something incorrectly,
> > 2) you simply did not find them,
> > 3) you do not have any groups
> >
> > I am sure that you probably did not find them...
> >
> > Anyway, try this:
> >
> > ldifde -f groups.ldf -s yourservername -t 389 -p subtree -r
> > "(objectClass=group)"
> >
> > This should result in a file ( called 'groups.ldf' ). See what happens
> when
> > you do this.
> >
> > HTH,
> >
> > Cary
> >
> > "TTS" <anonymous@discussions.microsoft.com> wrote in message
> > news:28338CCC-9024-4B45-84F8-9B2C0486AE80@microsoft.com...
> > > I tried this. But my containers and distribution listis not exported.
> > Please advice
> > >
> > > Thanks
> > > ----- Jimmy Andersson [MVP] wrote: -----
> > >
> > > See this article on LDIFDE:
> > >
> > > Using LDIFDE to Import and Export Directory Objects to Active
> > Directory.
> > > http://support.microsoft.com/default.aspx?scid=kb;en-us;237677
> > >
> > > Regards,
> > > /Jimmy
> > > --
> > > Jimmy Andersson, Q Advice AB
> > > Microsoft MVP - Directory Services
> > > ---------- www.qadvice.com ----------
> > >
> > >
> > > "TTS" <anonymous@discussions.microsoft.com> wrote in message
> > > news:E88112F5-E3C7-41B0-89D1-EEC6AB08137A@microsoft.com...
> > > > Hi all,
> > > >> Is it possible to export all the objects in AD (I mean all
like
> > OU,
> > > Exchange objects - let me say what ever I see in AD Users and
> > Computers
> > > snapin) and import it to another DC? After importing do I have to
> > enable all
> > > the users? Can anybody give the command to export all the objects
> > under AD
> > > Users and Computers snapin?
> > > >> Any KB articles, please advice?
> > > >> Thanks so much
> > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: LDIFDE
    ... Please advice and thanks so very much. ... TTS ... > for the computer accounts as well as the user accounts. ... > Operating System, the Operating System Version and the Operating ...
    (microsoft.public.win2000.active_directory)
  • Re: LDIFDE
    ... I can't still figure the switches and attributes I have to use to export certian data from AD. Could you advice me any KB articles or URL from where I get more information about Object Class, ... for the computer accounts as well as the user accounts. ... Operating System, the Operating System Version and the Operating System ... >> TTS, ...
    (microsoft.public.win2000.active_directory)
  • Re: LDIFDE
    ... I have been very busy. ... > for the computer accounts as well as the user accounts. ... > Operating System, the Operating System Version and the Operating ...
    (microsoft.public.win2000.active_directory)
  • Moving computer account to another OU
    ... I would like to move computer accounts from "computers" OU to another OU ... Operating system has to be the ruler. ... 'Edit the LDAP path as needed ...
    (microsoft.public.windows.server.scripting)
  • Re: How to properly remove a crashed DC from AD
    ... HTH, ... > if you get DSA object cannot be deleted, ADSI will take care of it for ... >> B. Delete the computer accounts from the ADUC. ...
    (microsoft.public.win2000.active_directory)