Announcement

Collapse
No announcement yet.

Get all attributes with dsquery

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get all attributes with dsquery

    How I can get with dsquery servers in windows 2008 SR2 Standard all attributes that appear in Attribute Editor?
    dsquery to do the following:
    dsquery cn=FRIEND,ou=aaa,ou=zzzzz,ou=users,dc=yyyyyy,dc=xx-limit 30000-scope base-attr *

    Only I get the following:

    objectClass
    objectClass
    objectClass
    objectClass
    cn:
    description:
    telephoneNumber:
    distinguishedName:
    displayName:
    company:
    name:
    objectGUID:
    codePage:
    countryCode:
    primaryGroupID:
    objectSid:
    sAMAccountName:
    sAMAccountType:
    userPrincipalName:
    objectCategory:
    mail:
    ADsPath:

    sorry for my English but I am Spanish and I used the google translator
    "The destination is the shuffled cards, but we are where we play."

  • #2
    Re: Get all attributes with dsquery

    Hi,

    You need to use powershell, bind the user to [ADSI]"LDAP://DN of the user" like this

    $testUser = [ADSI]"LDAP://CN=TestUSer,CN=user,DC=domain,DC=local"

    Then you can access all the properties of the users
    like
    $testuser.employeeID
    $testuser.cn

    like this
    other wise you can install AD Quest commandlets and user the following command
    get-qaduser -identity testUser -includeallproperties | FL
    Thanks & Regards
    v-2nas

    MCTS 2008, MCTIP, MCSE 2003, MCSA+Messaging E2K3, MCP, E2K7
    Sr. Wintel Eng. (Investment Bank)
    Independent IT Consultant and Architect
    Blog: http://www.exchadtech.blogspot.com

    Show your appreciation for my help by giving reputation points

    Comment


    • #3
      You can get all user attributes (actually all attributes for any AD object) using this command:
      dsquery * "CN=User Name,OU=User Accounts,DC=sub,DC=domain,DC=com" -attr * -limit 100000

      Comment


      • #4
        Holy thread resurrection, Batman
        I sort of hope they aren't still waiting for a solution from 2011!
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          Originally posted by Ossian View Post
          Holy thread resurrection, Batman
          I sort of hope they aren't still waiting for a solution from 2011!

          LOL that was a good one...
          Cheers,

          Daniel Petri
          Microsoft Most Valuable Professional - Active Directory Directory Services
          MCSA/E, MCTS, MCITP, MCT

          Comment

          Working...
          X