General discussion

  • Creator
  • #2074135

    Determining the Local DC in win2k with A


    by msluis ·

    Does anyone have some samples of how to determine which Domain Controller(s) is/are present in the local subnet. Using VBSCript /ADSI/WSH.

All Comments

  • Author
    • #3776639

      Determining the Local DC in win2k with A

      by guy ·

      In reply to Determining the Local DC in win2k with A

      Technet article: Q235617 has some information, perhaps it will give you some ideas, and get you started.

      The following script is in Microsoft Visual Basic Scripting language.

      Option Explicit
      Dim WSHNetwork, objArgs, ADOconnObj, bstrADOQueryString, RootDom, RSObj
      Dim FSMOobj,CompNTDS, Computer, Path, HelpText

      Set WSHNetwork = CreateObject(“WScript.Network”)
      Set objArgs = WScript.Arguments

      HelpText = “This script will find the FSMO role owners for your domain.” &Chr(13) &_
      Chr(10) & “The syntax is as follows:” & Chr(13) & Chr(10) &_
      “find_fsmo DC=MYDOM,DC=COM” & Chr(13) & Chr(10) &_
      “””Where MYDOM.COM is your domain name.””” & Chr(13) & Chr(10) & “OR:” &_ Chr(13) & Chr(10) & “find_fsmo MYDCNAME ” & Chr(13) & Chr(10) &_
      “””Where MYDCNAME is the name of a Windows 2000 Domain Controller”””

Viewing 0 reply threads