question

AdamTyler-3751 avatar image
0 Votes"
AdamTyler-3751 asked KaelYao-MSFT edited

Just what domain controllers is Exchange using anyway?

Can someone help me understand the different output given with these commands from the Exchange PowerShell prompt?

Get-ExchangeServer
Get-ADServerSettings
Get-ADDomainController

I had to hard code an Exchange server recently to a particular DC and was told by Microsoft to use the "Set-ExchangeServer" CmdLet. M$ said that I would need to reboot the server before the change would take affect, but I've read elsewhere these settings changes will take affect without a reboot, it just takes a couple of hours. Does anyone know for sure?

I ran this for example:
set-exchangeserver SvrHostName -staticdomaincontrollers DC03.domain.local -staticglobalcatalogs DC03.domain.local -staticconfigdomaincontroller DC03.domain.local

What is further confusing, if I run a Get-ExchangeServer command, I get output like this. Note I have not rebooted yet. Where is my DC03 setting?
141072-image.png




And are Get-ADServerSettings and Get-ADDomainController related to the set-ExchangeServer command? For example, would I run Get-ADServerSettings to see if the command Set-ExchangeServer was completed successfully and applied?

office-exchange-server-administration
image.png (12.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KaelYao-MSFT avatar image
0 Votes"
KaelYao-MSFT answered KaelYao-MSFT edited

Hi @AdamTyler-3751

The Get-ADServerSettings command returns the AD settings of the current Exchange Management Shell session.
You could use Set-ADServerSettings to change the current settings but if you open a new session, it doesn't keep the changes.

The Get-ADDomainController command is used to get information of domain controllers.
It doesn't show the current domain controller which is used by Exchange server.

To check the current domain controller Exchange is using, please use this command:

 Get-ExchangeServer -identity <server name> -status | fl *current*

141209-06.png
It would show the current domain controller and global catalog Exchange is using.

If you didn't add "-status" to the command, the results would be blank.
141273-07.png

To check if the static domain controller settings have been configured correctly, you may use this command:

 Get-ExchangeServer -identity <server name> -status | fl *static*

M$ said that I would need to reboot the server before the change would take affect, but I've read elsewhere these settings changes will take affect without a reboot, it just takes a couple of hours. Does anyone know for sure?

Based on my test, it only take a few minutes for the settings to take effect.
You may see Event 2095 and 2080 generated after you run the Set-ExchangeServer command.
Thus I suppose it isn't necessary to restart.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


06.png (4.4 KiB)
07.png (3.1 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@KaelYao-MSFT Thank you. Exactly the information I needed. Opened a $500 support case with Microsoft and they were not able to provide basic information like this.

One follow up question for you. What would be the set-exchangeserver command used to revert these settings back to their default? I assume by default Exchange selects the most appropriate DC,GC based on AD topology and shouldn’t necessarily be hard coded to one?

Regards,
Adam Tyler

0 Votes 0 ·

Hi Adam.

I assume by default Exchange selects the most appropriate DC,GC based on AD topology and shouldn’t necessarily be hard coded to one?

Yes. Usually it is more recommended to let Exchange decide which DC and GC to use instead of specifying the static values.

What would be the set-exchangeserver command used to revert these settings back to their default?

If the default value is none, you may use $null to set the value back to none.
0 Votes 0 ·
47451047 avatar image
0 Votes"
47451047 answered KaelYao-MSFT edited

@KaelYao-MSFT, hi.

I have two DNS servers in my network adapter, two global directories. But the output is one controller. And you have two. Why so?

CurrentDomainControllers : {Dattum-dc-01.resoleasing.com}
CurrentGlobalCatalogs : {Dattum-dc-01.resoleasing.com}
CurrentConfigDomainController : {Dattum-dc-01.resoleasing.com}

· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Apologies, I don't understand your question.

Regards,
Adam Tyler

0 Votes 0 ·

Why do you have two controllers in the CurrentDomainControllers and I have one? What does it depend on? If I have one, then I do not have high availability ? If one controller is not available, the second controller will not work correctly, which is listed second in dns ?

0 Votes 0 ·

Ah, well if you haven't made any changes to the way Exchange selects a Domain Controller and Global Catalog, it is supposed to automatically select these servers based on the Active Directory topology and you should never have to worry about it.

You can hard code a DC or set of DCs to these roles, but I don't imagine that is best practice. If you indeed do have two Domain Controllers and Global Catalogs in the same AD site with the Exchange server, I can't explain why a Get-ExchangeServer -status command wouldn't display both, but perhaps someone else on the thread more familiar with this mechanism can comment.

Additional thoughts @KaelYao-MSFT ?

1 Vote 1 ·
Show more comments