#region Logging.MaxLogFileAge$ScriptBlock={Param($Value)$Result=New-ObjectPSOBject-Property@{Success=$TrueMessage=""}try{[timespan]$timespan=$Value}catch{$Result.Message="Not a Timespan: $Value"$Result.Success=$Falsereturn$Result}if($timespan.TotalMilliseconds-le0){$Result.Message="Timespan cannot be set to 0 milliseconds or less: $Value"$Result.Success=$Falsereturn$Result}[Sqlcollaborative.Dbatools.dbaSystem.DebugHost]::MaxLogFileAge=$Valuereturn$Result}Register-DbaConfigHandler-Name'Logging.MaxLogFileAge'-ScriptBlock$ScriptBlock#endregion Logging.MaxLogFileAge