



Management of test accounts in an Active Directory production domain - Part III: Removal of test accounts (EN) | |||||||||||||||||||||||
Active
Directory test accounts are supposed to be created only in test
environments. However, this may not be true in some cases where a new
integration or update of a solution / software is in progress: Test
accounts may be required to do the needed tests and checks in the
production environment. In order to have a clear Life Cycle and an ease of management of test accounts, the following scripts were created:Unfortunately, Active Directory administrators may forget to remove test accounts after the end of tests. This is because they can be located under different Organizational Units and it may be difficult to identify them. Management of test accounts in an Active Directory production domain - Part I: Creation of test accounts Management of test accounts in an Active Directory production domain - Part II: Notification about expiry for test accounts Management of test accounts in an Active Directory production domain - Part III: Removal of test accounts Management of test accounts in an Active Directory production domain - Part III: Removal of test accounts If a test account expired and the owner have not asked for an extension of the expiry date of the test account, it can be removed as part of an automatic cleanup process of test accounts. This could be done using the following script that can be scheduled on daily basis. Before using the script, you need to update the following variables:
Verified on the following platforms
This script is tested on these platforms by the author. It is likely to work on other platforms as well. If you try it and find that it works on another platform, please add a note to the script discussion to let others know. Disclaimer The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages. |
The latest tutorials
About Tunit
Tunit helps you plan your Microsoft systems integration and administration.
Certainly, having a good Management of your IT systems improve your Business performance while it can, when it is poorly managed, obstruct the responsiveness and efficiency of your organization. We are here to help you so do not hesitate to follow us.
View more