Please wait,
Processing your request...

    0%
  Business logo VanSoest.it
  ... | Selecteer de Nederlandse taal |
Sharing is caring
| Print this page. | Linkedin page of Johan van Soest

React: Postcard image. Click this to mail to Johan

WebHalla
 Content
  Management
   System

ICT-Hotlist Topic

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 - 2024 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/11 computer

Using this script on a Windows 7, 8.1 or 10/11 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:


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.7 : Thursday 28-3-2024 © Copyright 1995-2024 ing. Johan P.G. van Soest CIPM Certified Privacy Information Manager
Response Form    Cookie- and Privacy statement    Responsible Disclosure procedure
Weather in Waalre by OpenWeatherMap logo light intensity shower rain
Temperature 7.31 °C light intensity shower rain
Wind chill 4.17 °C light intensity shower rain
Humidity 68 % light intensity shower rain
Air pressure 984 hPa light intensity shower rain
Wind speed 5.14 m/s light intensity shower rain
Wind direction South South light intensity shower rain
Sun Rise 6:21 Sun Rise
Sun Set 19:04 Sun Set
Updated:2024-03-28 10:45:59 light intensity shower rain

Weather Cache is 8 minute(s) old.
| Current user: Guest | Login |