0 votes

Is there an easy way to tell the system to use a specific Domain Controller? I'm trying to set up a custom command to add an email address to a large group of users (we're migrating their email to our system) and if I test it out on my own account or a test account, it works fine.

However, when I try it on a user that we want to actually add it to, it errors out with the following:

The operation couldn't be performed because object <user> couldn't be found on <one of our domain controllers>. I think this is an AD replication issue, but am unsure as to what is causing it (there are a bunch of Kerberos errors on that DC but none on our other 2 DCs).

As we are doing the migration on Friday, I want to be able to quickly use the custom command and figure out the issue later if possible. I know in the AD Users and Computers, you can change what Domain Controller you are currently connected to - does Adaxes give you this capability?

Here is the event log on the server that Adaxes is running on:

Log Name: Adaxes
Source: Adaxes Service
Date: 5/8/2013 3:19:52 PM
Event ID: 0
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: <server>
Softerra.Adaxes.BackgroundThreadException: Exchange 2010 PowerShell API: Failed to execute the following operation: Get mail settings of <user> ---> System.Management.Automation.RemoteException: The operation couldn't be performed because object <user> couldn't be found on <dc>.
at #dd.#3e.#i.#4e.Execute(PSCommand psCommand, String[]& warnings)
at #dd.#3e.#i.#4e.Execute(#ed command)
at #dd.#if.Execute(#ed command)
at #dd.#7e.#i.#9e.Execute(#ed command)
at #dd.#Ye.#h4(#fd command, #Ze context)
at #dd.#Ye.#a4(#6b mailParametersBuilder, IAdmObject targetObject, #Ze context)
at #dd.#Ye.ExecuteOperation(#3c operation, #Ze context)
at #dd.#Ye.#qU(#3c operation)
at #Oc.#Nc.Execute()
--- End of inner exception stack trace ---

by (440 points)


To prevent issues related to replication, Adaxes always tries to use one and the same Domain Controller to perform all operations in Active Directory and Exchange.
Did you create those users using Adaxes?


No, these users were created before we had Adaxes.

1 Answer

0 votes
by (18.0k points)

Update 2018

Starting with Adaxes 2018.1 there is an option to configure Adaxes to only connect to specific domain controllers. For details, have a look at the following help article: https://www.adaxes.com/help/UseSpecificDCs.


It is impossible to configure Adaxes to use a specific domain controller.

You can restart the computer where your Adaxes service is running, and with a high probability it'll connect to another DC.
Or you can turn off that DC, and Adaxes will automatically reconnect to another one.


I rebooted the Adaxes server and still get the same error for these users in an OU on a different DC - what could be the cause of that? It works on some users but not others.



I sent you a webex meeting invitation. Please join.


To prevent issues related to replication, Adaxes always tries to use one and the same Domain Controller to perform all operations in Active Directory and Exchange.


Is this also the case, when a request awaits approval ? For example, when moving a user.

I have experienced, that distinguishedname were not changed, when read right after the approval (read by a
Business Rule, After moving a User). When read, it contained the users old path and the following script naturally failed.
The user was moved allright, but the following scripts were never executed.

On the demo system this is never an issue, but in the production we have four DC's and more load on the servers.
We suspect, that this issue occours because Adaxes request data from a DC that is not yet synchronized ?



The issue is not related to DCs or replication. There is a bug in Adaxes with resolving the %distinguishedname% value reference after moving objects. We will fix it in one of the future releases.

For now, you can use the following line as a workaround in scripts:

$dn = $Context.TargetObject.Get("distinguishedName")

Related questions

0 votes
1 answer

Hello, We have multiple Domain Controllers in single domain. let saya DC1.domain.com, DC2.domain.com, DC3.domain.com When we want to get LastLogon value, how can we get the latest LastLogon value among the three DCs?

asked Dec 19, 2021 by fachmi (170 points)
0 votes
0 answers

Hi, Not worked with Adaxes before and just as I joined company we've had domain migration in place. After migration, whenever we want to access Exchange properties of a user ... works fine across domain..? Any ideas, however basic they may be?? regards Robert

asked Oct 16, 2019 by roberttryba (70 points)
0 votes
1 answer

Hi, We are a European branch of a US company, our Exchange server is in US and talks to the US DC. This leads to the situation that when our helpdesk resets a password, ... Even better would be if it could be scripted based on OU the user resides in. Thanks!

asked Dec 8, 2017 by digimortal (240 points)
0 votes
1 answer

Hello, is it possible to know which controller domain is connected to adxes ? and may be forced Adaxes has to connect to a domain controller in particular ? Thx.

asked Jun 23, 2014 by mmichard (360 points)
0 votes
1 answer

Hi again ! Is there a way in a BR Powershell script to get the Domain Controller Adaxes service is using for an operation. To be clearer, i use a powershell script in a ... can get the DC in the context, i could pass it to the powershell cmdlet. Thanks Stephen

asked Jun 22, 2012 by sroux (800 points)
2,807 questions
2,541 answers
64,585 users