Just what domain controllers is Exchange using anyway?

Anonymous
2021-10-16T21:58:44.717+00:00

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?

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,348 questions
0 comments No comments
{count} votes

Accepted answer
  1. Kael Yao-MSFT 37,496 Reputation points Microsoft Vendor
    2021-10-18T07:52:31.443+00:00

    Hi @Anonymous

    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.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Андрей Михалевский 2,601 Reputation points
    2021-10-19T08:08:48.953+00:00

    @Kael Yao-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}