Skip to content

msDS-deletedObjectLifetime incorrectly assessed #200

@vitorpereira

Description

@vitorpereira

If msDS-deletedObjectLifetime is null it defaults to the same value as tombstoneLifetime, not to 60 as per the code in bold below.
In my case I have tombstoneLifetime = 180 and msDS-deletedObjectLifetime = Null and it's getting reported as 60 when it's in fact 180.

if ($null -eq $Output) {
    [PSCustomObject] @{
        'TombstoneLifeTime'          = 60
        'msDS-deletedObjectLifetime' = 60
    }
} else {
    if ($Output.tombstoneLifetime -and $Output.'msDS-deletedObjectLifetime') {
        [PSCustomObject] @{
            DistinguishedName            = $Output.DistinguishedName
            'TombstoneLifeTime'          = $Output.tombstoneLifetime
            'msDS-deletedObjectLifetime' = $Output.'msDS-deletedObjectLifetime'
        }
    } elseif ($Output.tombstoneLifetime) {
        [PSCustomObject] @{
            DistinguishedName            = $Output.DistinguishedName
            'TombstoneLifeTime'          = $Output.tombstoneLifetime
            **'msDS-deletedObjectLifetime' = 60**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions