How do you programmatically determine whether a Windows computer is a member of a domain?

后端 未结 7 622
情话喂你
情话喂你 2020-12-31 09:43

I need a way to determine whether the computer running my program is joined to any domain. It doesn\'t matter what specific domain it is part of, just whether it is connecte

7条回答
  •  囚心锁ツ
    2020-12-31 10:40

    what about from the name of the computer?

    edit: this was a crapy 'answer' from way back. What I meant was cheching for the form domain\name in the computer name. That of course implies that you do know the name of the domain, it does not solves the issue of just knowing if the computer is in any domain.

提交回复
热议问题