List of domain's users 
Author Message
 List of domain's users

By remote, for unlocked every account on my domain I use an ADSI script. How
can I display, through an ADSI script, the list of domain's users into a
.csv file??
I need to obtain a list that contain info about each user (username,
description, account disabled (y/n), account locked-out (y/n)). Whit this
text file I can show weekly or monthly statistics about the connection on
the domain.
Thanks in advance for collaboration,
Valerio


Fri, 02 Jul 2004 05:03:19 GMT  
 List of domain's users
1) Get an instance of the domain
    Set oDomain = GetObject("WinNT://MyDomain")

2) Filter for "User" objects
    oDomain.Filter = Array("User")

3) Loop through the result writing out whatever info you want
    For Each oUser In oDomain
        '...
    Next 'oUser

If you need information on how to actually perform the writing of the
properties to a text file, let me know and I'll be happy to help with that.

--

=============================
Kyle M. Burns, MCSD, MCT


Quote:
> By remote, for unlocked every account on my domain I use an ADSI script.
How
> can I display, through an ADSI script, the list of domain's users into a
> .csv file??
> I need to obtain a list that contain info about each user (username,
> description, account disabled (y/n), account locked-out (y/n)). Whit this
> text file I can show weekly or monthly statistics about the connection on
> the domain.
> Thanks in advance for collaboration,
> Valerio



Fri, 02 Jul 2004 08:14:50 GMT  
 List of domain's users
It works perfectly. Thanks for your help.
Rgds
Valerio Valentini



Quote:
> 1) Get an instance of the domain
>     Set oDomain = GetObject("WinNT://MyDomain")

> 2) Filter for "User" objects
>     oDomain.Filter = Array("User")

> 3) Loop through the result writing out whatever info you want
>     For Each oUser In oDomain
>         '...
>     Next 'oUser

> If you need information on how to actually perform the writing of the
> properties to a text file, let me know and I'll be happy to help with
that.

> --

> =============================
> Kyle M. Burns, MCSD, MCT



Sat, 03 Jul 2004 04:11:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. listing user's display name and domain

2. Getting full list of Domain Users is not working properly - some users missing

3. Getting full list of Domain Users is not working properly - some users missing

4. Bind to domain and list OU and users

5. Getting a list of users from the domain

6. Listing Domain users

7. list computer's domain

8. Question on querying Domain users' info

9. Getting WinNT 4 User's domain properties

10. Logon scripts specific to a user's domain group

11. How to List Domain Controllers in domain

12. Listing an NT user's rights via script

 

 
Powered by phpBB® Forum Software