0 votes

Does anyone know of a good method of finding the other computers in the current configuration set? I'm messing around with some logging features and I'd like to back up my exported logs by copying them to every server in the set, but I'd prefer to be able to dynamically ascertain that information rather than relying on a hardcoded collection.

by (50 points)
0

Hello,

Starting from Adaxes 2013.2, you can store log records in an external MS SQL database, and, unlike the built-in logging database, it can store log records from multiple Adaxes service. For more details, see Database for Logging. Are there any reasons why you cannot use an external database for storing log records from all your Adaxes services?

0

There is no real reason why we couldn't utilize an MSSQL db for logging. I might just give that a whirl. Thanks for the tip.

Back to the original question, is there a way to identify other servers in a configuration set via powershell?

1 Answer

0 votes
by (216k points)
selected by
Best answer

Update 2019

Starting with Adaxes 2019.1 you can check all the services sharing common configuration in the Administration console. For details, have a look at the following help article: https://www.adaxes.com/help/MultiServerEnvironment.

Original

Hello,

Here's a sample script that updates the Execution Log with DNS host names of all Adaxes services that belong to the same configuration set as the Adaxes service where the script is run. The script can be run as a part of a Business Rule, Custom Command or Scheduled Task.

$configurationSetSettingsPath = $Context.GetWellKnownContainerPath("ConfigurationSetSettings")
$configurationSetSettings = $Context.BindToObject($configurationSetSettingsPath)

$dnsHostNames = $configurationSetSettings.GetServicesDnsHostNames()

foreach ($dnsHostName in $dnsHostNames)
{
    $Context.LogMessage($dnsHostName, "Information")
}

Here's a version of the same script that outputs the DNS host names on the PowerShell console. To be able to run the script, you need to be logged in to Windows as an Adaxes Service Administrator.

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

$admNS = New-Object("Softerra.Adaxes.Adsi.AdmNamespace")
$admService = $admNS.GetServiceDirectly("localhost")

$configurationSetSettingsPath = $admService.Backend.GetConfigurationContainerPath("ConfigurationSetSettings")
$configurationSetSettings = $admService.OpenObject($configurationSettingsPath, $NULL, $NULL, 0)

$dnsHostNames = $configurationSetSettings.GetServicesDnsHostNames()

Write-Host "Adaxes services that belong to the current configuration set:"
foreach ($dnsHostName in $dnsHostNames)
{
    Write-Host "`t$dnsHostName"
}

Related questions

0 votes
1 answer

Trying to create a custom command to run a powershell script, but I keep getting an error saying it can't find the file or path supplied for launching powershell. ... and I can launch powershell from this location using Command Prompt. Am I missing something?

asked Oct 24 by cstaub (100 points)
0 votes
1 answer

I have a scheduled task that runs the following PowerShell script. $user = New-AdmUser -Server $domain -AdaxesService localhost -Path $workdayDn -ChangePasswordAtLogon $true -PassThru - ... ) over all objects. I'm stumped! Any help would be super appreciated.

asked Sep 5 by emeisner (100 points)
0 votes
1 answer

Hi so if I have the web-interface setup on my internal server where I did the full install but I also have setup a RODC in DMZ how can I "merge" so that the URLS given ... get the offline/unlock that shows up to link and show/work for the web server on the DMZ

asked Nov 4 by ckelley (40 points)
0 votes
1 answer

Hi Everyone We have 3 Adaxes services set up around the globe and followed the MS SQL replication how-to (https://www.adaxes.com/help/EnableDatabaseReplication/) to then ... use their local SQL server and make use of the SQL replication setup? Thanks, Felix

asked Jul 24 by felix (150 points)
0 votes
1 answer

We can authenticate if we login to the machine hosting the service but if I have the client installed on my desktop, I can't authenticate with any ... .com/en-us/windows-server/security/credentials-protection-and-management/protected-users-security-group

asked Sep 12, 2022 by mark.it.admin (2.3k points)
3,549 questions
3,240 answers
8,232 comments
547,820 users