Richard
Tue Mar 25 19:04:33 PDT 2008
Remco wrote:
> I want to export a list of all users including the value of the "pager"
> field, so that I can edit it with Excel for example.
> Does anyone know how to? Ithink it can be done with an LDAP query?
You can use ADO in a VBScript program to retrieve the sAMAccountName and
pager attributes of all users. sAMAccountName is the NT names of the users,
also called the "pre-Windows 2000 logon name". You could retrieve
distinguishedName instead. For info on using ADO see this link:
http://www.rlmueller.net/ADOSearchTips.htm
You can also use Joe Richards' adfind command line tool. Your filter would
be:
(&(objectCategory=person)(objectClass=user))
Your list of attributes would be:
sAMAccountName,pager
If you output the values in one comma delimited line per user you can import
into Excel.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab -
http://www.rlmueller.net
--