win32net.NetGetAnyDCName

PyUnicode = NetGetAnyDCName(server, domain )

Returns the name of any domain controller trusted by the specified server.

Parameters

server=None : PyUnicode

Specifies the name of the remote server on which the function is to execute. If this parameter is None, the local computer is used.

domain=None : PyUnicode

Specifies the name of the domain. If this parameter is None, the name of the domain controller for the primary domain is used.