This can only be done by querying for the lastLogonTimestamp attribute across *all* DCs in your domain. In w2k this attribute's data is not replicated between DCs, but in w2k3, this data is replicated and shared between all DCs in the domain so is more readily available.
Thanks, Neil MVP (AD) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 04 August 2004 04:24 Subject: [ActiveDir Digest] --------------------------------------------------------- Date: Mon, 02 Aug 2004 23:07:09 -0500 From: Cody Fleming <[EMAIL PROTECTED]> Subject: RE: [ActiveDir] dsquery Reply-To: [EMAIL PROTECTED] This is a multi-part message in MIME format. --Boundary_(ID_h3U9eWynPdytVG5HaETvJg) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Ok, good to know, Is there an alternative way to identify User objects that have not logged on in given amount of time 'Stale'? I'd like to be able to first query this or log it to a file then optionally be able to do a remove or something like -dsrm. Thanks, Cody -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Free, Bob Sent: Monday, August 02, 2004 3:37 PM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] dsquery >Does 'dsquery -inactive' work against a Windows 2000 domain with SP4? Nope, it needs uses an attribute called lastLogonTimestamp that is not available in 2000. ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cody Fleming Sent: Monday, August 02, 2004 12:18 PM To: [EMAIL PROTECTED] Subject: [ActiveDir] dsquery Hello, Does 'dsquery -inactive' work against a Windows 2000 domain with SP4? Here is what I ran from an XP workstation and W2K3 member server: ' dsquery user dc=domain,dc=company,dc=com -inactive 12 ' I get the following error: ' dsquery failed:The parameter is incorrect.:Windows could not run this query because you are connected to a domain that does not support this query. ' The other switches seem to work fine, maybe I missed something in the syntax? Thanks, Cody 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/ --Boundary_(ID_h3U9eWynPdytVG5HaETvJg) Content-type: application/ms-tnef; name=winmail.dat **** MIME Non-Text Attachment Skipped ***** --------------------------------------------------------- Subject: RE: [ActiveDir] dsquery From: Deji Akomolafe <[EMAIL PROTECTED]> Date: Mon, 2 Aug 2004 21:43:53 -0700 Reply-To: [EMAIL PROTECTED] --_82586A6E-C2D0-4A5E-8223-A15263908E26_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I thought we nailed this already. Apparently not. So, here's the nail: http= ://www.rlmueller.net/freecode4.htm Enjoy. Sincerely, D=E8j=EC Ak=F3m=F6l=E1f=E9, MCSE MCSA MCP+I Microsoft MVP - Directory Services www.readymaids.com - we know IT www.akomolafe.com Do you now realize that Today is the Tomorrow you were worried about Yester= day? -anon From: Cody Fleming Sent: Mon 8/2/2004 9:07 PM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] dsquery Ok, good to know, Is there an alternative way to identify User objects that have not logged o= n in given amount of time 'Stale'? I'd like to be able to first query this= or log it to a file then optionally be able to do a remove or something li= ke -dsrm. Thanks, Cody -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Free, Bob Sent: Monday, August 02, 2004 3:37 PM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] dsquery >Does 'dsquery -inactive' work against a Windows 2000 domain with SP4? Nope, it needs uses an attribute called lastLogonTimestamp that is not available in 2000. =20 ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cody Fleming Sent: Monday, August 02, 2004 12:18 PM To: [EMAIL PROTECTED] Subject: [ActiveDir] dsquery Hello, =20 Does 'dsquery -inactive' work against a Windows 2000 domain with SP4? =20 Here is what I ran from an XP workstation and W2K3 member server: =20 ' dsquery user dc=3Ddomain,dc=3Dcompany,dc=3Dcom -inactive 12 ' =20 I get the following error: =20 ' dsquery failed:The parameter is incorrect.:Windows could not run this query because you are connected to a domain that does not support this query. ' =20 =20 The other switches seem to work fine, maybe I missed something in the syntax? =20 Thanks, =20 Cody 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/ ============================================================================== This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. ============================================================================== 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/
