How do I find out which computer is the domain controller in Windows programmatically?

前端 未结 7 1012
星月不相逢
星月不相逢 2021-01-30 08:17

I am looking for a way to determine what the Name/IP Address of the domain controller is for a given domain that a client computer is connected to.

At our company we hav

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-30 08:45

    From command line query the logonserver env variable.

    C:> SET L

    LOGONSERVER='\'\DCNAME

提交回复
热议问题