Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UI for NT Admin access to NT API
Message
From
19/10/2000 17:27:39
 
 
To
19/10/2000 16:19:14
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00431787
Message ID:
00431852
Views:
9
>An NT Admin asked me if I could create a GUI to be able to report on existing NT Server Groups and Users to be able to create many-to-many queries. They want to read the data at runtime and query for users on one Group or Groups for one user. They have tons of users and groups and have a hard time to manage movements from users between groups and their permissions with the NT Admin interface.
>
>I could easily do this if I knew of API functions to access this info, or if there is a COM interface to it. I looked into WSH and did not see anything to report on NT Groups/Users. Security access should not be a problem as only Admins will use this app.
>
>Is this possible? Can anyone point me to a reference or info on this?

This is fairly easy using ADSI. For example, to get a list of all users in a domain:

oDomain = GETOBJECT("WinNT://MYDOMAIN,Domain")

FOR EACH oItem IN oDomain
IF oItem.Class = "User"
?oItem.Name
ENDIF
ENDFOR

To get a list of all groups, and members of each group:

FOR EACH oItem IN oDomain
IF oItem.Class = "Group"
?oItem.Name
FOR EACH oUser IN oItem.Members
?oUser.Name
ENDFOR
ENDIF
ENDFOR

The ADSI objects are extensively documented in MSDN.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform