Please wait,
Processing your request...

    0%
  Business logo VanSoest.it  
  ... | Selecteer de Nederlandse taal | Print this page. | Linkedin page of Johan van Soest | User: Guest | Login

Postcard image. Click this to mail to Johan

WebHalla
 Content
  Management
   System


ICT-Hotlist Topic

Back to the ICT-Hotlist...
Don't miss the latest updates

How to determine Active Directory Tombstone Lifetime

Microsoft Active Directory is a multi-master database replicated among multiple Domain Controllers. To make sure that objects are fully replicated before any deletions are processed (purged), objects are marked for deletion (soft delete).
The Active Directory Tombstone Lifetime determines how long deleted items exist in the Active Directory before they are purged. The default value was originally 60 days, but this was increased to 180 days starting with new Active Directory forests created with Windows 2003 SP1 or newer. This also has consequences for Domain Controllers down time. A Domain Controller that is off-line for longer than the Active Directory Tombstone Lifetime should not be brought on-line.

How to determine Active Directory Tombstone Lifetime value?

This topic will show you two ways:
  • Using AdsiEdit
  • Using PowerShell 2.0 or newer

Determining Active Directory Tombstone Lifetime value using AdsiEdit

  1. Start AdsiEdit
  2. Navigate to Configuration [<FQDN server>] | CN=Services | CN=Windows NT | CN=Directory Service
    Example: CN=Configuration,DC=NLAALDC1,DC=local | CN=Services | CN=Windows NT | CN=Directory Service
  3. Right click and select Properties
  4. Select tombstoneLifetime
  5. When the value is not set, the tombstone lifetime setting is set to 60 days (default for AD forests installed with Windows 2003 or older).

Determining Active Directory Tombstone Lifetime value using PowerShell 2.0 or newer

###############################################################################################
# This PowerShell script determines the Active Directory Tombstone Lifetime Setting
#
# System requirements: - Run this script on a Domain Controller (AD DS/LDS role) or (preferred)
#                        Windows workstation with RSAT
#                      - PowerShell 2.0 or newer
# (C)Copyrights 2016 - 2019 vanSoest.it by J.P.G. van Soest
###############################################################################################

# Load the Active Directory PowerShell module.
Import-Module ActiveDirectory
# Clear the screen so the data is nicely presented.
cls
Write-Output
"This PowerShell script determines the Active Directory Tombstone Lifetime Setting"
# Connect to the Active directory Configuration Partition
$ADForestconfigurationNamingContext = (Get-ADRootDSE).configurationNamingContext
$DirectoryServicesConfigPartition = Get-ADObject -Identity "CN=Directory Service,CN=Windows NT,CN=Services,$ADForestconfigurationNamingContext" -Partition $ADForestconfigurationNamingContext -Properties *
# Extract the correct values
$TombstoneLifetime = $DirectoryServicesConfigPartition.tombstoneLifetime
$ADCreated = $DirectoryServicesConfigPartition.Created
# if no value exists, it is an Active Directory created with Windows 2003 or older. Default is 60 days.
if (!$TombstoneLifetime){
  $TombstoneLifetime = 60
}
# Format output
Write-Output "Active Directory is created at $ADCreated and it's Tombstone Lifetime is set to $TombstoneLifetime days."
This script requires an installed PowerShell Active Directory module. The PowerShell AD module is installed:
  • by default, on a Windows Server 2008 R2, 2012 R2 or newer when you install the AD DS or AD LDS server roles
  • by default, when you make a Windows Server 2008 R2 or newer a domain controller by running Dcpromo.exe
  • as part of the Remote Server Administration Tools (RSAT) feature on a Windows Server 2008 R2 server
  • as part of the RSAT feature on a Windows 7, 8.1 or 10 computer

Using this script on a Windows 7, 8.1 or 10 desktop?

You may need to load the Active Directory module by configuring RSAT. Read more about installing and configuring RSAT here
You may vote your opinion about this article:


Topic created  :  01-05-2017
Topic last edited  :  11-05-2017

Scripts and programming examples disclaimer

Unless stated otherwise, the script sources and programming examples provided are copyrighted freeware. You may modify them, as long as a reference to the original code and hyperlink to the source page is included in the modified code and documentation. However, it is not allowed to publish (copies of) scripts and programming examples on your own site, blog, vlog, or distribute them on paper or any other medium, without prior written consent.
Many of the techniques used in these scripts, including but not limited to modifying the registry or system files and settings, impose a risk of rendering the Operating System inoperable and loss of data. Make sure you have verified full backups and the associated restore software available before running any script or programming example. Use these scripts and programming examples entirely at your own risk. All liability claims against the author in relation to material or non-material losses caused by the use, misuse or non-use of the information provided, or the use of incorrect or incomplete information, are excluded. All content is subject to change and provided without obligation.
Generated by WebHalla™ Version 0.1.e.2 : Tuesday 22-1-2019 © Copyright 1995-2019 Johan van Soest
Response Form    Cookie- and Privacy statement
Weather in Waalre by OpenWeatherMap logo mist
Temperature -3.76 °C mist
Humidity 85 % mist
Air pressure 1017 hPa mist
Wind speed 2.1 m/s mist
Wind direction South South mist