+ Post New Thread
Results 1 to 13 of 13
Windows Thread, Report inactive computers in Active Directory in Technical; does anyone have a safe peice of software that will query active directory and generate a report on computers that ...
  1. #1
    HMCTech's Avatar
    Join Date
    Apr 2008
    Posts
    618
    Thank Post
    37
    Thanked 48 Times in 35 Posts
    Rep Power
    23

    Report inactive computers in Active Directory

    does anyone have a safe peice of software that will query active directory and generate a report on computers that have been inactive for over a period of time.

  2. #2
    somabc's Avatar
    Join Date
    Oct 2007
    Location
    London
    Posts
    2,337
    Thank Post
    83
    Thanked 388 Times in 258 Posts
    Rep Power
    112
    You can use dsquery to get a list eg. to find all computers unused for 8 weeks

    Code:
    dsquery computer -inactive 8 -limit 0
    To delete the computers

    Code:
    dsquery computer -inactive 8 -limit 0 | dsrm
    Last edited by somabc; 26th April 2010 at 11:00 AM.

  3. Thanks to somabc from:

    Trapper (26th April 2010)

  4. #3

    3s-gtech's Avatar
    Join Date
    Mar 2009
    Location
    Wales
    Posts
    3,106
    Thank Post
    161
    Thanked 655 Times in 588 Posts
    Rep Power
    169
    You can use WSUS for this

  5. #4
    HMCTech's Avatar
    Join Date
    Apr 2008
    Posts
    618
    Thank Post
    37
    Thanked 48 Times in 35 Posts
    Rep Power
    23
    thanks somabc,

    Could you give some detail about the number after inactive and limit? I assume in your example 8 means it will show any computers inactive for over 8 weeks, and no limit ont he number of results?

  6. #5
    somabc's Avatar
    Join Date
    Oct 2007
    Location
    London
    Posts
    2,337
    Thank Post
    83
    Thanked 388 Times in 258 Posts
    Rep Power
    112
    Dsquery computer has details - inactive is no of weeks and limit is no of objects in AD to show with 0 being unlimited

  7. Thanks to somabc from:

    HMCTech (26th April 2010)

  8. #6

    Join Date
    Oct 2008
    Location
    Lincolnshire
    Posts
    2,345
    Thank Post
    13
    Thanked 240 Times in 228 Posts
    Rep Power
    70
    I use oldcmp and run this batch file

    oldcmp -report -age 120 -format csv

    You can change the format and age, I then just go through Active Directory and disable and move the accounts to another OU. You can get it to disable and delete the accounts I think but I wanted a little more control. Did 1800 machines the other week. You can download oldcmp if you just Google it.

  9. #7
    robk's Avatar
    Join Date
    Nov 2005
    Location
    Ashbourne
    Posts
    547
    Thank Post
    185
    Thanked 130 Times in 109 Posts
    Blog Entries
    1
    Rep Power
    49
    I use a small VB Script to pick out old machines and user details. Shout if you want a copy

  10. #8

    Join Date
    Jan 2006
    Location
    Surburbia
    Posts
    2,178
    Thank Post
    74
    Thanked 307 Times in 243 Posts
    Rep Power
    116
    I use oldcmp
    Me too & can't think of anything better (it's from joeware.net amongst some other very good free utils)

  11. #9
    box_l's Avatar
    Join Date
    May 2007
    Location
    Herefordshire
    Posts
    439
    Thank Post
    80
    Thanked 95 Times in 79 Posts
    Rep Power
    63
    I Have successfully used Quest AD Cmdlets for this task.

    You will need to install and run the Quest Powershell console, these commands do not seem to run in the standard shell even with the cmdlets installed. A bit like exchange 2010 seems to need its own shell.

    Quest AD Cmdlets are free to download from PowerShell Commands (CMDLETs) for Active Directory by Quest Software

    Code:
    get-qadcomputer -IncludeAllProperties | Where-Object { $_.lastlogon -lt (get-date).AddDays(-90) }
    Outputs to shell console

    Code:
    get-qadcomputer -IncludeAllProperties | Where-Object { $_.lastlogon -lt (get-date).AddDays(-90) } | select-object Name, ParentContainer, Description, pwdLastSet | export-csv c:\outdated.csv
    Outputs to csv

    Code:
    get-qadcomputer -IncludeAllProperties | Where-Object { $_.lastlogon -lt (get-date).AddDays(-90) } | Move-QADObject -to my.corp/obsolete
    Moves to alternate OU

    tack this to the end to disable the accounts
    Code:
    | disable-QADComputer
    Check Locate obsolete computer records in AD « Dmitry’s PowerBlog: PowerShell and beyond for more.

    And QAD cmdlets reference - PowerGUI Wiki

    BoX

  12. Thanks to box_l from:

    TheScarfedOne (24th February 2011)

  13. #10
    TheLibrarian
    Guest
    Quote Originally Posted by PiqueABoo View Post
    Me too & can't think of anything better (it's from joeware.net amongst some other very good free utils)
    I love the warranty on the utilities he offers... warranty and license

  14. #11

    Join Date
    Mar 2014
    Posts
    19
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    2
    Cjwdev | AD Tidy Free software can tell you the last time a pc was seen on the network, what dc it logged on to, and you can disable and move computer / user accounts all at the same time

  15. #12
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    4,002
    Thank Post
    983
    Thanked 477 Times in 398 Posts
    Blog Entries
    12
    Rep Power
    98
    We use Dovestone True Last Logon

    Active Directory True Last Logon - dovestones software

    Just change the option to show when a computer was last logged on and sort it by date. I usually do this once a term.

  16. #13
    round2it's Avatar
    Join Date
    May 2009
    Location
    UK
    Posts
    1,084
    Thank Post
    255
    Thanked 161 Times in 116 Posts
    Rep Power
    41
    admanager plus is good for this it also lets you export info about groups

    install on your workstation you dont need to touch the server



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 6
    Last Post: 31st May 2011, 09:05 AM
  2. active directory
    By bart21 in forum Windows Server 2000/2003
    Replies: 1
    Last Post: 4th January 2010, 09:24 PM
  3. Replies: 0
    Last Post: 6th April 2009, 11:26 PM
  4. Active Directory
    By Neville in forum Windows
    Replies: 6
    Last Post: 25th June 2008, 04:24 PM
  5. Replies: 7
    Last Post: 31st January 2008, 01:17 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
  •