Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADForestProperties - TombstoneLifetime #302

Closed
JakeDean3631 opened this issue May 29, 2019 · 0 comments · Fixed by #549
Closed

ADForestProperties - TombstoneLifetime #302

JakeDean3631 opened this issue May 29, 2019 · 0 comments · Fixed by #549
Assignees
Labels
enhancement The issue is an enhancement request.

Comments

@JakeDean3631
Copy link

JakeDean3631 commented May 29, 2019

Details of the scenario you tried and the problem that is occurring

My customer is currently using a script resource to configure AD Forest TombstoneLifetime setting. This capability should be introduced into the ADForestProperties resource.

Verbose logs showing the problem

N/A

Suggested solution to the issue

Add TombstoneLifetime parameter to the Get/Set/Test-TargetResource scripts within the ADForestProperties resource.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

Script resource currently being used for this functionality:

script ADTombstoneLifetime
{
    GetScript  = {
        $configurationNamingContext = (Get-ADRootDSE).configurationNamingContext
        $identity = "CN=Directory Service,CN=Windows NT,CN=Services,$configurationNamingContext"
        $directoryPartition = Get-ADObject -Identity $identity -Partition $configurationNamingContext -Properties *
        return @{ Result = $directoryPartition.tombstonelifetime }
    }
    SetScript  = @{
        $tombstoneLifetime = $using:TombstoneLifetime
        $configurationNamingContext = (Get-ADRootDSE).configurationNamingContext
        $identity = "CN=Directory Service,CN=Windows NT,CN=Services,$configurationNamingContext"
        $null = Set-ADObject -Identity $identity -Partition $configurationNamingContext -Replace @{tombstonelifetime = $tombstoneLifetime }
    }
    TestScript = {
        $tombstoneLifetime = $using:TombstoneLifetime
        $configurationNamingContext = (Get-ADRootDSE).configurationNamingContext
        $identity = "CN=Directory Service,CN=Windows NT,CN=Services,$configurationNamingContext"
        $directoryPartition = Get-ADObject -Identity $identity -Partition $configurationNamingContext -Properties *

        if ( $directoryPartition.tombstonelifetime = $tombstoneLifetime )
        {
            return $true
        }
        else
        {
            return $false
        }
    }

The operating system the target node is running

Version and build of PowerShell the target node is running

Version of the DSC module that was used ('dev' if using current dev branch)

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels May 30, 2019
@johlju johlju changed the title xADForestProperties - TombstoneLifetime ADForestProperties - TombstoneLifetime Jul 28, 2019
@X-Guardian X-Guardian added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Jan 17, 2020
@X-Guardian X-Guardian self-assigned this Jan 17, 2020
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants