Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Wed, 2 Jul 2008 13:17:22 -0700,    group: microsoft.public.inetsdk.programming.scripting.vbscript        back       


Querying all AD Computer Accounts and the lastLogon attribute   
I have a VBS script and would like to query all AD Computer accounts and the 
lastLogon attribute.

My search criteria is this.

objCommand.CommandText=("<LDAP://DC=flhlaw,DC=local>;(&(|(objectCategory=person)(objectCategory=computer))(objectClass=user));distinguishedName,name,lastLogon,givenName,sAMAccountName,memberOf;subtree;")

when I echo the "name" and "distinguishedName" 
I have no errors, but when I add "lastLogon" I receive
(18, 1) ADODB.Recordset: Item cannot be found in the collection 
corresponding to t
he requested name or ordinal.

What am I doing wrong?
date: Wed, 2 Jul 2008 13:17:22 -0700   author:   Mike YO_BEE B

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us