Announcement

Collapse
No announcement yet.

LDAP Query

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

  • LDAP Query

    Hello;

    can i make an LDAP query from domain member PC. if it's answer is yes, how? i need to monitor the network while querying form domain member pc to DC. or are there any other way to see the connection and packet transmission between domain controller and domain member pc? i would like to test network because domain member pc's are very slow at startup.

    thanks.

  • #2
    Re: LDAP Query

    yes you can run a LDAP query from a member server\pc, depending on what you want to query you may need more rights (i.e. Domain Admins).

    You need to explain exactly what you want to do for us to help you more.

    If PC's are slow at startup\logon, then it's a DNS issue!! Start looking there.
    * Shamelessly mentioning "Don't forget to add reputation!"

    Comment


    • #3
      Re: LDAP Query

      any query can be. i only need to monitor network while querying to DC. can you write me an example of command promt command for querying?

      Comment


      • #4
        Re: LDAP Query

        Code:
        On Error Resume Next
        
        Set objConnection = CreateObject("ADODB.Connection")
        Set objCommand =   CreateObject("ADODB.Command")
        objConnection.Provider = "ADsDSOObject"
        objConnection.Open "Active Directory Provider"
        Set objCommand.ActiveConnection = objConnection
        
        objCommand.Properties("Page Size") = 1000
        
        objCommand.CommandText = _
            "<LDAP://dc=domain,dc=com>;(objectCategory=User);Name;Subtree"  
        Set objRecordSet = objCommand.Execute
        objRecordSet.MoveFirst
        
        Do Until objRecordSet.EOF
            Wscript.Echo objRecordSet.Fields("Name").Value
            objRecordSet.MoveNext
        Loop
        This will return all Users in your Domain. Save as .vbs file and run from the command prompt as
        Code:
        cscript Query.vbs
        * Shamelessly mentioning "Don't forget to add reputation!"

        Comment


        • #5
          Re: LDAP Query

          Alternatively you could try Network Monitor or Wireshark and filter the capture or display traffic of the specific client (s).
          Caesar's cipher - 3

          ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

          SFX JNRS FC U6 MNGR

          Comment

          Working...
          X