active directory computers

I am way behind on cleaning up active directory computers.  I know there are many in there that are not around anymore.  How do I determine if they are active or not?
mkramer777Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SeanSystem EngineerCommented:
Powershell or CMD as administrator:

dsquery computer -inactive 7 -limit 200

Open in new window


This will find all computers that have been inactive for 7 weeks.

There is a way to delete them but I'm always more comfortable doing it manually but in case you wish to do so automatically...with cation use:
dsquery computer -inactive 7 | dsrm -noprompt

Open in new window


you could also just disable them by using:

dsquery computer –disabled | dsrm -noprompt

Open in new window

1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Naveen SharmaCommented:
Here is an article which lets you how to find disable and inactive Active Directory user and computer accounts and move them to different OU: Powershell to Find Inactive AD Users and Computers Accounts. Else, use Active Directory clean up solution to identify and clean up inactive Active Directory user accounts.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.