+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
Windows Server 2000/2003 Thread, list of inactive users in Technical; hey ppl, I'm trying to create a query to get a list of users inactive for 60 days or users ...
  1. #1
    techie211's Avatar
    Join Date
    Feb 2009
    Posts
    148
    Thank Post
    36
    Thanked 1 Time in 1 Post
    Rep Power
    0

    list of inactive users

    hey ppl, I'm trying to create a query to get a list of users inactive for 60 days or users who have not logged on to the network for 60 days. I tried to run dsquery but got an "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". Any help on this is appreciated

  2. #2


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,677
    Thank Post
    279
    Thanked 782 Times in 609 Posts
    Rep Power
    224
    What's the functional level of your domain/forest? That might be where dsquery is choking.

    dsquery -inactive 8

    will give you a list of people who haven't logged in for 8 weeks (56 days)

    Use the -o option to format the output (samid for example) and the -limit option to set how many to display.

    dsquery user /? for usage.

    It's also (iirc) a pre-canned GUI query from AD Users and Computers.
    Last edited by pete; 26th April 2011 at 03:12 PM.

  3. Thanks to pete from:

    nephilim (26th April 2011)

  4. #3
    techie211's Avatar
    Join Date
    Feb 2009
    Posts
    148
    Thank Post
    36
    Thanked 1 Time in 1 Post
    Rep Power
    0
    functional level of your domain = Windows 2000 native

  5. #4

    Join Date
    Dec 2008
    Location
    Essex
    Posts
    2,144
    Thank Post
    1
    Thanked 326 Times in 316 Posts
    Rep Power
    77
    You would want to filter out any resource/service accounts as these wil be inactive but used.

  6. #5

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,821
    Thank Post
    272
    Thanked 1,140 Times in 1,036 Posts
    Rep Power
    350
    I think you can do an advanced search in AD for people who have not logged in for a set period. I then tend to select all remove to a new ou and then wait a few months and then finally delete the accounts.

  7. #6


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,677
    Thank Post
    279
    Thanked 782 Times in 609 Posts
    Rep Power
    224
    Quote Originally Posted by techie211 View Post
    functional level of your domain = Windows 2000 native
    That'll be why - dsquery relies on lastLogonTimeStamp, which needs 2003 native or greater.

  8. #7
    techie211's Avatar
    Join Date
    Feb 2009
    Posts
    148
    Thank Post
    36
    Thanked 1 Time in 1 Post
    Rep Power
    0
    What is my next option as I can't switch domain function levels yet?

  9. #8

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,821
    Thank Post
    272
    Thanked 1,140 Times in 1,036 Posts
    Rep Power
    350
    Quote Originally Posted by techie211 View Post
    What is my next option as I can't switch domain function levels yet?
    In Ad open up search - select the Find: drop down menu and select Common Queries. You can then select select days since last logon.

  10. 2 Thanks to glennda:

    joe90bass (27th April 2011), timzim (27th April 2011)

  11. #9
    joe90bass's Avatar
    Join Date
    Oct 2007
    Location
    S Wales
    Posts
    1,354
    Thank Post
    328
    Thanked 107 Times in 96 Posts
    Rep Power
    51
    Quote Originally Posted by glennda View Post
    In Ad open up search - select the Find: drop down menu and select Common Queries. You can then select select days since last logon.
    I've run dsquery before to disable inactive accounts, but shockingly I didn't know you could do this! So easy, so obvious...... And I see I can do what I wanted to check out - see who has non-expiring passwords!

  12. #10

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,821
    Thank Post
    272
    Thanked 1,140 Times in 1,036 Posts
    Rep Power
    350
    Quote Originally Posted by joe90bass View Post
    I've run dsquery before to disable inactive accounts, but shockingly I didn't know you could do this! So easy, so obvious...... And I see I can do what I wanted to check out - see who has non-expiring passwords!
    it took me a lot of googling to find that!

  13. #11
    techie211's Avatar
    Join Date
    Feb 2009
    Posts
    148
    Thank Post
    36
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by glennda View Post
    In Ad open up search - select the Find: drop down menu and select Common Queries. You can then select select days since last logon.
    I'm at that section but I get nothing in results..?? what do I put in the 'Name' and 'Description' box? thanks

  14. #12

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,821
    Thank Post
    272
    Thanked 1,140 Times in 1,036 Posts
    Rep Power
    350
    Quote Originally Posted by techie211 View Post
    I'm at that section but I get nothing in results..?? what do I put in the 'Name' and 'Description' box? thanks
    nothing - just make sure you are search whole domain.

  15. #13
    techie211's Avatar
    Join Date
    Feb 2009
    Posts
    148
    Thank Post
    36
    Thanked 1 Time in 1 Post
    Rep Power
    0
    when I search for just 'Disabled accounts' I get results but once I select a 'Days since last logon' the results window is blank..?? could it be my domain function level again?

  16. #14

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,821
    Thank Post
    272
    Thanked 1,140 Times in 1,036 Posts
    Rep Power
    350
    Quote Originally Posted by techie211 View Post
    when I search for just 'Disabled accounts' I get results but once I select a 'Days since last logon' the results window is blank..?? could it be my domain function level again?
    not to sure - have you tried the smallest amount of days?

  17. #15
    techie211's Avatar
    Join Date
    Feb 2009
    Posts
    148
    Thank Post
    36
    Thanked 1 Time in 1 Post
    Rep Power
    0
    yes, tried them all

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. List of Inactive Users from system manager
    By newcareer in forum MIS Systems
    Replies: 4
    Last Post: 20th August 2010, 08:11 AM
  2. List of users
    By leco in forum MIS Systems
    Replies: 3
    Last Post: 26th January 2009, 01:46 PM
  3. List of users logged on a workstation
    By sLiDeR in forum Windows
    Replies: 6
    Last Post: 4th December 2007, 12:40 PM
  4. Replies: 10
    Last Post: 31st March 2007, 05:40 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •