Announcement

Collapse
No announcement yet.

Export list of USERS and the OU they belong to

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Export list of USERS and the OU they belong to

    I am needing a way to export all the users in my domain and the OU that they belong to. I've tried searching all over google but have had no luck.
    Basically i need a script, or a program that can look at my domain and export a file that looks something like this...

    - DOMAIN
    |- OU1
    |- User1
    |- User2
    |- OU2
    |- User 3
    |- User 4

    or something to that affect...even a spreadsheet would be fine, just as long as it has the UserName and OU that the user belongs to.

    thanks for any help!!!

  • #2
    Re: Export list of USERS and the OU they belong to

    try reading the tread above.
    we had a simmilar post couple days ago and I think you cant do exactly want you want.
    you can use csvde but you can get only the unsorted list of users.
    The chase is better than the catch

    Comment


    • #3
      Re: Export list of USERS and the OU they belong to

      Can i use CSVDE to export "UserName" and the "canonical name of object" ???

      Comment


      • #4
        Re: Export list of USERS and the OU they belong to

        Why dont you just try...
        open cmd and type CSVDE -d "OU=OU name,DC=sth,dc=com" -f drive:\filename.csv then drop it into excel
        and see what is going to happen
        Cheers
        The chase is better than the catch

        Comment


        • #5
          Re: Export list of USERS and the OU they belong to

          well i did use the "CSVDE -f temp.csv" and then deleted all the worthless info that it created. So i guess overall that was a solution.
          Thanks for your help!

          Comment


          • #6
            Re: Export list of USERS and the OU they belong to

            Looks like you found a solution but you can also use dsquery (e.g. "dsquery user domainroot" will list all users in every OU).

            You can also pipe the results of dsquery to dsget for more detailed info (e.g. "dsquery user ou=test,dc=name,dc=com | dsget user -memberof" will list group membership for all users in the test ou).

            You can use them to get most AD info so they're useful for scripting.

            Comment

            Working...
            X