Announcement

Collapse
No announcement yet.

extract from AD

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

  • extract from AD

    I need a tool or script that can grab FN LN PHONE # and EMAIL from my AD.


    Does anyone know such a way?

    thank you very very mcuh

  • #2
    Re: extract from AD

    csvde can do this.

    http://blogs.techrepublic.com.com/networking/?p=427

    Comment


    • #3
      Re: extract from AD

      also: dsquery.exe * -limit 0 -Filter "..........."
      and: ADSI/vbscripts


      Here you can find references for the LDAP Name of user attributes shown in aduc:
      - http://www.kouti.com/tables/userattributes.htm
      - http://www.selfadsi.org/attadus.htm


      \Rems

      This posting is provided "AS IS" with no warranties, and confers no rights.

      __________________

      ** Remember to give credit where credit's due **
      and leave Reputation Points for meaningful posts

      Comment


      • #4
        Re: extract from AD

        ok i have a command line but i need to add telephone # and i cannot get it to work

        i have this and it works like a charm but when i add the telephone part it errors out

        this works
        cmd /c dsquery.exe * -limit 0 -filter "(&(objectCategory=person)(objectClass=user)(mail= *))" -attr name mail >"c:\PrimaryEmailAddresses.txt"

        this fails

        cmd /c dsquery.exe * -limit 0 -filter "(&(objectCategory=person)(objectClass=user)(mail= *)(telephoneNumber)" -attr name mail >"c:\PrimaryEmailAddresses.txt"

        thanks to all who can help!!!

        Comment


        • #5
          Re: extract from AD

          When you add 'telephoneNumber' to the filter you have to enter a value to compare with, in this case you can use a wildcard (*) if the attribute shouldn't be empty.
          Next, add 'telephoneNumber' also to the attributes (-attr) to show the telephonenumbers in the output file.

          Code:
          dsquery.exe * -limit 0 -filter "(&(objectCategory=person)(objectClass=user)(mail=*)(telephoneNumber=*))" -attr name mail telephoneNumber >"c:\PrimaryEmailAddresses.txt"
          \Rems

          This posting is provided "AS IS" with no warranties, and confers no rights.

          __________________

          ** Remember to give credit where credit's due **
          and leave Reputation Points for meaningful posts

          Comment


          • #6
            Re: extract from AD

            Maybe somfing like this:
            dsquery group -name "My Group Name" | dsget group -members | dsget user -email

            try also look
            dsquery /?
            dsget user /?

            Comment


            • #7
              Re: extract from AD

              Thanks Evryone! !!!!!

              Comment

              Working...
              X