How do most admins keep track of active computers in active directory

There has been a number of computers that are inactive.  We never had any sort of master list to keep track of active or inactive computers. Now we must do some housecleaning in our active directory and remove computers that no longer exists. What do most admins do or what is there approach for house cleaning the AD  environment? how would I know what machines are inactive so I can remove them from active directory
joukiejoukAsked:
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.

asavenerCommented:
It varies from environment to environment. Smaller environments can do with a spreadsheet.  Larger environments likely have some kind of CMDB (configuration management database).

You need to decide on what should be the authoritative list, and then set up a process to periodically true-up active directory to the authoritative list.

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
Matt DeVernaCIOCommented:
At my old company we wrote a Powershell script to pull which AD Computers were inactive or have not been logged into for more than 90 days.

If a machine was inactive for more than 90 days we put it into a "disabled computer" OU, disabled the machines then if no one reached out to say they could not login within a week we deleted the computers.
Lee W, MVPTechnology and Business Process AdvisorCommented:
You could just run (from a DC) DSQUERY Computer -inactive 13 to get a list of all computers that have been inactive for the last 13 weeks and delete them.  (Once deleted, if there was a mistake, you can just add them back).  Though you might take intermediate measures like putting them in an OU with a group policy attached that pops up a notice to the end user that the machine will be removed unless the end user reports to IT that it's still active.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

E ATech LeadCommented:
You may get help from this blog to keep track of inactive computers and ways to regularly clean up inactive users & computers in your Active Directory.
joukiejoukAuthor Commented:
I will look into these options.
joukiejoukAuthor Commented:
Hello Lee W,

I am using your method and have ran DSQUERY Computer -inactive 13 to identify inactive computers. I see the results. Is there a way to export the results to Excel?
asavenerCommented:
FYI, that will also display disabled computer accounts.

IMO, a better way is to use powershell:  https://gallery.technet.microsoft.com/scriptcenter/Get-Inactive-Computer-in-54feafde
joukiejoukAuthor Commented:
Never use Powershell before, and need some help. I've placed the powershell script in the following directory of an AD server in which i plan to execute it on.
2016-06-07_16-11-38.png
I bring up PS and ran the command but got the following error below.
2016-06-07_16-15-57.png
Can someone please tell me the proper command?
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.