Active Directory -- Identifying Old Computers

    Have you ever looked in Active Directory Users and Computers and wondered whether or not the list of computers is a list of every computer that has ever existed since the beginning of time?  Me neither.  ;)

    The following command will return a list of computers that have been inactive for X weeks.  In the example below, I'm looking for computers that have been inactive for more than 4 weeks.

    dsquery computer -inactive 4

    Be careful -- remote users, on laptops for example, could accidentally get identified as an old and deleted by mistake.

    © 2020