Results 1 to 2 of 2

Thread: NT Users!

  1. #1
    Guest
    Hi,

    How can I get the list of users registered on NT on a specific domain? I want to get that list to include the login id and login name details.

    Any help in this regard is appreciated.

    Regards,
    Subrahmanyam

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    ADSI Object

    I just modified this code base on the MSDN sample code.
    Code:
         Dim TheDomain As IADsDomain
         Dim User As IADsUser
         Dim strDomain As String
    
         'Accept the Domain name
         strDomain = InputBox("Domain Name: ")
    
         'Use the WinNT Directory Services
         strDomain = "WinNT://" & strDomain
    
         'Create the Domain object
         Set TheDomain = GetObject(strDomain)
    
         'Search for Computers in the Domain
         TheDomain.Filter = Array("User")
         
         On Error Resume Next
         For Each User In TheDomain
             DoEvents
             Debug.Print User.Name
         Next User
    
        'Clean up
         Set User = Nothing
         Set TheDomain = Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width