Results 1 to 4 of 4

Thread: Delete old user accounts

  1. #1
    Join Date
    Oct 2004
    Posts
    26

    Delete old user accounts

    Hello, I’m running a Server where I need to search for the last “lastlogon”. I have two questions regarding the same. First how can I find and delete old user accounts? And second if possible how can I create a saved querie in ADUC?

    Thanks for your helps.

  2. #2
    Join Date
    Sep 2004
    Posts
    102

    Re: Delete old user accounts

    Whenever you post a question make sure to provide as much details as you can provide. For example, I don’t know what server you are using. Anyways, you can use the new lastLogonTimeStamp attribute in case you are using Windows 2003 functional level domain. Or you can go with LastLogon itself. Though, this attribute is not replicated. A different value for each user is kept on each domain controller. Also, it is Integer8 (a 64-bit number).

  3. #3
    Join Date
    Oct 2004
    Posts
    26

    Re: Delete old user accounts

    I’m really sorry for insufficient information. Yes, I’m running a domain at Windows 2003 functional level and yes I wanted to use the lastLogonTimeStamp attribute. But here I want to know if there is any way I can disable the script and or simply delete accounts. Note, I only want to delete the accounts who have not logged in since past 90 days.

    Is it possible to create a query in ADUC that searches for the lastLogonTimeStamp attribute? Many thanks

  4. #4
    Join Date
    Sep 2004
    Posts
    144

    Re: Delete old user accounts

    Yes, you can query in ADUC based on lastLogonTimeStamp, but since the value is Integer8, you will need code to determine the value corresponding to 90 days in the past. In ADUC, Filter Options, Create custom filter, Customize..., on the Advanced tab enter an LDAP query such as:

    (&(objectCategory=person)(objectClass=user)(lastLogonTimeStamp<=127204344000
    000000))

    The value I used above corresponds to 2/5/2004. The trick is finding the
    value you want. The link below is a VBScript program to convert a date to
    the Integer8 (64-bit) value you need:

Similar Threads

  1. delete user accounts in Windows 8
    By Anek in forum Operating Systems
    Replies: 3
    Last Post: 05-06-2013, 12:43 PM
  2. Replies: 4
    Last Post: 17-08-2010, 12:20 AM
  3. Delete User Accounts Windows Me
    By Ron1 in forum Operating Systems
    Replies: 2
    Last Post: 19-08-2009, 10:14 AM
  4. How to Change user accounts with Super user in Linux/Unix
    By mellisahi in forum Tips & Tweaks
    Replies: 2
    Last Post: 26-01-2009, 06:20 PM
  5. Can't log on to my user accounts
    By Deffen-Baugh in forum Windows XP Support
    Replies: 2
    Last Post: 11-10-2008, 11:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,938,870.88450 seconds with 17 queries