+ Post New Thread
Results 1 to 11 of 11
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 46 Times in 35 Posts
    Rep Power
    22

    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
    111
    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 10:00 AM.

  3. Thanks to somabc from:

    Trapper (26th April 2010)

  4. #3

    3s-gtech's Avatar
    Join Date
    Mar 2009
    Location
    Wales
    Posts
    2,484
    Thank Post
    133
    Thanked 488 Times in 436 Posts
    Rep Power
    138
    You can use WSUS for this

  5. #4
    HMCTech's Avatar
    Join Date
    Apr 2008
    Posts
    618
    Thank Post
    37
    Thanked 46 Times in 35 Posts
    Rep Power
    22
    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
    111
    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
    Jul 2010
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by AlexPilot View Post
    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.
    In case anyone is interested in solving issues of this kind using a third party solution, my personal advice is Softerra Adaxes. The software contains a vast list of AD reports, and the one particular that solves the issue is called "Inactive Computers". It allows to view computers inactive during a period of time. Thank you.

  9. #7

    Join Date
    Oct 2008
    Location
    Lincolnshire
    Posts
    2,054
    Thank Post
    11
    Thanked 204 Times in 198 Posts
    Rep Power
    63
    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.

  10. #8
    robk's Avatar
    Join Date
    Nov 2005
    Location
    Ashbourne
    Posts
    654
    Thank Post
    165
    Thanked 124 Times in 103 Posts
    Blog Entries
    1
    Rep Power
    47
    I use a small VB Script to pick out old machines and user details. Shout if you want a copy

  11. #9

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

  12. #10
    box_l's Avatar
    Join Date
    May 2007
    Location
    Herefordshire
    Posts
    403
    Thank Post
    63
    Thanked 84 Times in 69 Posts
    Rep Power
    60
    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

  13. Thanks to box_l from:

    TheScarfedOne (24th February 2011)

  14. #11
    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

SHARE:
+ Post New Thread

Similar Threads

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