Solved

How long do machines stay in AD?

Posted on 2016-09-30
6
31 Views
Last Modified: 2016-11-09
If machines have been removed off the network, is there a setting to remove the machines from AD automatically? Or do we have to do it manually?

If there is a setting, where is it?
0
Comment
Question by:Thomas N
6 Comments
 
LVL 17

Expert Comment

by:pjam
ID: 41823549
Interesting question.  I have always deleted them as they stay there until I do.
If there is a setting I would like to know too
0
 
LVL 16

Expert Comment

by:Ivan
ID: 41823551
Hi,

I don't think there is a setting for that. Machines not connected in 90 days loose connectivity and have to be rejoined. As far as I know, you would have to do it manually.

I guess that it could be done via some script, that would check when did machine last time connected to domain, and if it did not in past XX days, it would delete computer account.. but I would not do it.

Maybe some1 else has some idea :)

Regards,
Ivan.
0
 
LVL 22

Accepted Solution

by:
Joseph Moody earned 334 total points
ID: 41823553
There is not a built in stale object removal feature in AD. There are many free scripts and tools though. My favorite is oldcmp. http://www.joeware.net/freetools/tools/oldcmp/index.htm

But you can also use powershell (here is an example: https://deployhappiness.com/managing-inactive-computers-and-users-in-active-directory/)
0
 
LVL 22

Assisted Solution

by:Joseph Moody
Joseph Moody earned 334 total points
ID: 41823557
Before deleting computers, you will want to enable the AD recycle bin as a safety switch. Some people also disable the objects and move them to a special OU for X amount of time before deleting them.
0
 
LVL 53

Assisted Solution

by:McKnife
McKnife earned 166 total points
ID: 41824686
@Ivan's "Machines not connected in 90 days loose connectivity and have to be rejoined." - what are you talking about? There is no such mechanism, you can stay offline like forever an you are still able to connect, no unjoining takes place.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now