Discussion Locked

Determining the Local DC in win2k with A

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Does anyone have some samples of how to determine which Domain Controller(s) is/are present in the local subnet. Using VBSCript /ADSI/WSH.

2 replies

by guy

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"""

This discussion is closed to new replies.