For the function Get-WinADTombstoneLifetime, when the property tombstoneLifetime does not exist the existing function code does not catch it in the if statement and therefore the result is $null in the returned value from the function. The code should be altered slightly to look for $output.tombstoneLifetime, not just $output
For the function Get-WinADTombstoneLifetime, when the property tombstoneLifetime does not exist the existing function code does not catch it in the if statement and therefore the result is $null in the returned value from the function. The code should be altered slightly to look for $output.tombstoneLifetime, not just $output
existing code: `function Get-WinADTomebstoneLifetime { [Alias('Get-WinADForestTomebstoneLifetime')] [CmdletBinding()] param( [alias('ForestName')][string] $Forest, [System.Collections.IDictionary] $ExtendedForestInformation ) $ForestInformation = Get-WinADForestDetails -Forest $Forest -ExtendedForestInformation $ExtendedForestInformation
Check tombstone lifetime (if blank value is 60)
}`
proposed code change:
if ($null -eq $Output.tombstoneLifetime) { [PSCustomObject] @{ TombstoneLifeTime = 60 } } else { [PSCustomObject] @{ TombstoneLifeTime = $Output.tombstoneLifetime }