Home All Groups Group Topic Archive Search About

How to find all user and export to Excel



Author
11 Oct 2007 4:36 PM
Luis Gabriel Mieles
Hi all.

I would like to find all user with employeeid from Active Directory User and
Computer.

Thanks in advance.

Luis Gabriel Mieles.

Author
11 Oct 2007 5:13 PM
Richard Mueller [MVP]
Luis Gabriel Mieles wrote:

>
> I would like to find all user with employeeid from Active Directory User
> and
> Computer.
>
> Thanks in advance.
>

I have an example VBScript program that documents all users in the domain in
an Excel spreadsheet linked here:

http://www.rlmueller.net/Create%20User%20List%203.htm

The program can be modified to only document users that have a value
assigned to the employeeID attribute. Modify this statement:

strFilter = "(&(objectCategory=person)(objectClass=user))"

so that it becomes:

strFilter = "(&(objectCategory=person)(objectClass=user)(employeeID=*))"

This changes the LDAP syntax filter so the ADO query retrieves information
for all user objects where there is any value assigned to the employeeID
attribute. For more on using ADO, see this link:

http://www.rlmueller.net/ADOSearchTips.htm

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--

AddThis Social Bookmark Button