C:\>dsquery computer -name wad11020576 "CN=WAD11020576,OU=Engineering,OU=Desktop,DC=wireless,DC=attws,DC=com"
but when I try C:\>dsquery computer -name wad11020576 -attr lastLogon `-attr' is an unknown parameter. Ldifde I don't have at my disposal at the moment. Rick J. Jones -----Original Message----- From: Al Lilianstrom [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 9:45 AM To: [EMAIL PROTECTED] Subject: Re: [ActiveDir] Last Logon Details Jones, Rick J.(Desktop Engineering) wrote: > Using ADSIedit, I examined the Schema for CN=Computer and it does not have an entry for lastLogon so... does that mean that we would need to add it to the Schema and then would start populating from the DC's? > > Rick J. Jones > You should not have to add anything. You might want to try a alternate way of viewing lastLogon. If you have XP try dsquery * dc=your,dc=domain -filter name='computername' -attr lastlogon This should give you something like lastlogon 126932432713370885 for output. You can also use ldifde. (May wrap) c:\> ldifde -f c.tmp -s yourdc -d "dc=your,dc=domain" -r "name=computername" -l "lastlogon" c:\> type c.tmp|find "lastLogon" lastLogon: 126933401349707772 Of course you have to convert that number to a date. I have an example in Perl if you want it. al -- Al Lilianstrom CD/CSS/CSI [EMAIL PROTECTED] List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
