This is an organizational decision, but that is normally the metric I use. Anything that has not logged into AD in six months is probably safe to delete. This property defines the last time the computer logged into AD. This runbook runs based on the lastLogonDate property of the Get-ADComputer PowerShell cmdlet. If you do not need a log of what the runbook deleted, the second line is not needed. The top line is what actually does the object delete, while the bottom line sends an email and writes a log of what was done. It is split into two sections with the same input. This is what your runbook will look like. This article will show you a simple Orchestrator runbook that will clean out these old machines. Actually keeping these old and unused objects out of our environment can be a challenge. Keeping your AD and CM 2012 environment clean of old objects is key to making sure that you can get accurate and relevant information for your environment. This article is in a continuing series about using Orchestrator to automate tasks in CM 2012.
0 Comments
Leave a Reply. |