vbscript, I used to do as follows in our Windows 2003 domain. I used an LDAP query on each DC but you probably won't need to do that. I used ADO:
Set objCommand = CreateObject("ADODB.Command")
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
objCommand.ActiveConnection = oConnection
objCommand.CommandText = sQuery
objCommand.Properties("Page Size") = 100
objCommand.Properties("Timeout") = 60
objCommand.Properties("Cache Results") = False
strDC = "YourDCname"
strDomain = "Your domain name"
strBase = "LDAP://" & strDC & "/" & strDomain & ">"
strFilter = "(objectClass=computer)"
strAttributes = "distinguishedName,lastLogon,Name"
strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
objCommand.CommandText = sQuery
Set objRecordSet = objCommand.Execute
That gets all of the computers into a recordset that you can loop through and list out the lastlogondate.
I use PowerShell these days. Far, far easier. I know that it won't [b]run[/b] on Windows 2000 but you can access Windows 2000 from a Windows 2003 or XP PowerShell install. You're on your own with this because I can't test it but it's worth installing PS and getting hold of Quest Active Directory Tools for PS. That will let you pull out what you want in seconds. The Quest blurb seems to suggest that it will give you access.
The reason I push PS is for vb you'll have the job of converting the "ticks since 1/1/1601" into something useful! If you reckon you might want to go down this route, post again and I'll set that out.
There is a property "LastLogonTimeStamp" that might do. It's not as accurate.
Neil :)
Because of the way that this page deals with stuff, I've had to remove the "less than", "<" from in front of "LDAP", above, so you could see it.