Sure, here it is:
$retentionDays = 30 # TODO: modify me
$admNS = New-Object("Softerra.Adaxes.Adsi.AdmNamespace")
$admService = $admNS.GetServiceDirectly("localhost")
# Bind to the Service Log
$path = $admService.Backend.GetConfigurationContainerPath("ServiceLog")
$serviceLog = $admService.OpenObject($path.ToString(), $NULL, $NULL, 0)
# Set the retention time
$serviceLog.LogHoldTime = $retentionDays
I restore the previous log every time after upgrade via a script and would like to put this setting into it as well.
In the latest build of Adaxes the Log Database is included in the Backup/Restore, which means that you no longer need to restore the previous log every time you upgrade.