The Easy Way FSMO
The Easy Way FSMO
How to Determine the RID, PDC, and Infrastructure FSMO Holders of a Selected Domain
1. Click Start, click Run, type dsa.msc, and then click OK.
2. Right-click the selected Domain Object in the top left pane, and then click Operations Masters.
3. Click the PDC tab to view the server holding the PDC master role.
4. Click the Infrastructure tab to view the server holding the Infrastructure master role.
5. Click the RID Pool tab to view the server holding the RID master role.
1. On any domain controller, click Start, click Run, type Ntdsutil in the Open box, and then click OK.
2. Type roles, and then press ENTER.
3. Type connections, and then press ENTER.
4. Type connect to server <servername>, where <servername> is the name of the server you want to use, and
then press ENTER.
5. At the server connections: prompt, type q, and then press ENTER again.
6. At the FSMO maintenance: prompt, type Select operation target, and then press ENTER again.
7. At the select operation target: prompt, type List roles for connected server, and then press ENTER again.
8. Type q 3 times to exit the Ntdsutil prompt.
The hard way
Write a script to query ADSI edit to obtain the FSMO role holders. Fortunatly the hardwork has already been done for
you.. Just paste the following for an example:
Option Explicit
Dim WSHNetwork, objArgs, ADOconnObj, bstrADOQueryString, RootDom, RSObj
Dim FSMOobj,CompNTDS, Computer, Path, HelpText
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"""
ADOconnObj.Provider = "ADSDSOObject"
ADOconnObj.Open "ADs Provider"
'PDC FSMO
bstrADOQueryString = "<LDAP://"&Path&">;(&(objectClass=domainDNS)(fSMORoleOwner=*));adspath;subtree"
Set RootDom = GetObject("LDAP://RootDSE")
Set RSObj = ADOconnObj.Execute(bstrADOQueryString)
Set FSMOobj = GetObject(RSObj.Fields(0).Value)
Set CompNTDS = GetObject("LDAP://" & FSMOobj.fSMORoleOwner)
Set Computer = GetObject(CompNTDS.Parent)
WScript.Echo "The PDC FSMO is: " & Computer.dnsHostName
'Rid FSMO
bstrADOQueryString = "<LDAP://"&Path&">;(&(objectClass=rIDManager)(fSMORoleOwner=*));adspath;subtree"
'Infrastructure FSMO
bstrADOQueryString =
"<LDAP://"&Path&">;(&(objectClass=infrastructureUpdate)(fSMORoleOwner=*));adspath;subtree"
'Schema FSMO
bstrADOQueryString = "<LDAP://"&RootDom.Get("schemaNamingContext")&_
">;(&(objectClass=dMD)(fSMORoleOwner=*));adspath;subtree"