all possible property of objUser

User avatar
sal21
PlatinumLounger
Posts: 4362
Joined: 26 Apr 2010, 17:36

all possible property of objUser

Post by sal21 »

Instead to have only the 8 property of objUser is possible to insert into the first for each a second loop to get all possible property of objUser?????

my code:

Code: Select all

Option Explicit
Sub ListUsers(strDomain)

    Dim objComputer As Object, objUser As Object
    
    Set objComputer = GetObject("WinNT://" & strDomain)
    objComputer.FILTER = Array("User")
    
    For Each objUser In objComputer
        Debug.Print "Name: " & objUser.Name
        Debug.Print "Fullname: " & objUser.FullName
        Debug.Print "Description: " & objUser.Description
        Debug.Print "AccountDisabled: " & objUser.AccountDisabled
        Debug.Print "IsAccountLocked: " & objUser.IsAccountLocked
        Debug.Print "Profile: " & objUser.Profile
        Debug.Print "LoginScript: " & objUser.LoginScript
        Debug.Print "HomeDirectory: " & objUser.homeDirectory
        Debug.Print ""
    Next
    
End Sub

Sub UNO()

Dim strDomain
Do
   strDomain = InputBox("Please enter a domainname", "Input")
Loop Until strDomain <> ""

ListUsers (strDomain)

End Sub

User avatar
HansV
Administrator
Posts: 78528
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: all possible property of objUser

Post by HansV »

I have no idea.

See User class (Windows) for a list of available attributes.
Perhaps you can find something you need in ADSI Scripts.
Best wishes,
Hans