There are five FSMO operations master roles: the forest-scoped operations master role (schema master) and the domain naming master role (realm naming master), and the domain-wide operations master role three, respectively, the RID master role (RID Master), the PDC emulation master role (PDC Emulator), and the Infrastructure master role (Infrastructure Master), both the forest-wide host role and the domain-wide master role must be unique. How to query the FSMO role location, the following three kinds of query methods to share to everyone, hope can help everyone.
1. View the current operations master role information through DOS commands :
View current FSMO Host role information netdom query FSMO
2. View the current operations master role through dsquery server :
dsquery server [-o {DN | rdn}] [-forest] [-domain DomainName] [-site sitename][-name name] [-desc description][-hasfsmo {s Chema | name | INFR | PDC | RID}] [-ISGC] [{-S Server |-D domain}][-u UserName] [-p {Password | *}] [-Q] [-r] [-GC] [-limit NUMBEROFOBJECTS][{-UC |- UCO | -UCI}]
Parameters
-O {DN | rdn} Specifies the display format for the list of entries found by the search. The value DN Displays the distinguished name of each entry. The value RDN displays the relative distinguished name of each entry. By default, the DN format is used.
-forest searches all domain controllers (server objects) that belong to the current forest.
-domain DomainName searches all domain controllers that belong to the domain (the DNS name of the domain is specified by DomainName). Note: This parameter is not required if you want to display all the domain controllers in the current domain, because this is the search condition when no other criteria are specified.
-site SiteName searches all domain controllers (server objects) that belong to the site SiteName.
-name name searches for server objects whose name attribute (the value of the CN attribute) matches name. For example, "jon*" or "*ith" or "j*th".
-desc Description searches for server objects whose description properties match the Description. For example, "jon*" or "*ith" or "j*th".
-hasfsmo {Schema | name | infr | pdc | rid} searches for the domain controller (server object) that contains the requested operations master role. The schema master for the value schema request forest. The value name is the domain naming master of the requesting forest. The value INFR the infrastructure master of the request forest. The value of the PDC request is the primary domain controller (PDC) role owner of the domain specified by the-domain parameter (or the current domain used). The value of the RID request is specified by the-domain parameter (or the current domain used) for the domain's relative ID master (RID master). For the INFR, PDC, and RID operations master roles, the current domain is used if the domain is not specified using the-domain parameter.
-ISGC searches all domain controllers (server objects) in the range specified by one of the-forest,-domain, or-site parameters that belong to the global catalog server. If no of the above range parameters are specified, all global catalogs in the current domain are found.
{-S server |-d domain} is connected to the specified remote server or domain. By default, the computer is connected to a domain controller in the logon domain.
-u username Specifies the user name that the user wants to use to log on to the remote server. By default,-U uses the user name when the user logs on. You can specify a user name using any of the following formats:? User name (for example, Linda)
Domain user name (for example, Widgetslinda)
User principal Name (UPN) (e.g. [email protected])
-P {Password | *} Specifies to log on to the remote server using a password or *. If you type *, you will be prompted to enter your password.
-Q reduces all output to standard output (quiet mode).
-r Specifies that the search will use recursion or tracking references during the search. By default, searches will not track references during a search.
-GC Specifies that the search uses the Active Directory global catalog.
-limit numberofobjects Specifies the number of objects that will be returned that match the given criteria. If the value of Numberofobjects is 0, all matching objects are returned. If this parameter is not specified, the first 100 results are displayed by default.
{-UC |-uco |-uci} Specifies to output or enter data in Unicode format. The following table lists and describes each of these formats.
Value |
Describe |
-uc |
|
-uco |
Specifies the output to a pipeline (|) or file in Unicode format. |
-uci |
Specifies to import from a pipe (|) or file in Unicode format. |
Comments
The results of the dsquery search can be used as a pipe input for one of the other directory Service command-line tools, such as dsget, dsmod, dsmove, or dsrm.
If the value you provide contains spaces, enclose the content in quotation marks (for example, "Cn=mike danseglio,cn=users,dc=microsoft,dc=com").
If you want to supply multiple values to a parameter, use a space to separate multiple values (for example, a list of distinguished names).
Example:
To find all the domain controllers in the current domain, type:
dsquery server
To find all domain controllers in the forest and display their relative distinguished names, type:
dsquery server-o rdn-forest
To find all domain controllers in a site named states and display their relative distinguished names, type:
dsquery server-o rdn-site-states
To locate a domain controller in the forest that has the schema operations master role, type:
dsquery server–forest–hasfsmo schema
To find all domain controllers in the domain widgets.microsoft.com (belonging to the global catalog server), type:
dsquery server–domain widgets.microsoft.com-isgc
View schema master role dsquery.exe Server-hasfsmo schema
View domain naming master role dsquery.exe Server-hasfsmo name
View RID master role dsquery.exe Server-hasfsmo RIDs
View PDC emulation master role dsquery.exe Server-hasfsmo PDC
View Infrastructure master role Dsquery.exe Server-hasfsmo INFR
3. View the current operations master role through PowerShell :
To view the forest-scoped operations master role: Get-adforest azureyun.local |ft Schemamaster,domainnamingmaster
View domain scope operations master role: Get-addomain azureyun.local |ft Infrastructuremaster,pdcemulator,ridmaster
4. graphical interface to view the current operations master role:
By using the Active Directory Users and Computers right-click Property Operations Master option, view:
A. View the RID master role:
B. View the PDC impersonation master role:
C. View the infrastructure master role:
For Active directory Domains and trust right-click Operations master Options, view the domain naming master role:
D. View the domain naming master role:
To view the schema master role preferred to register DLL dynamic libraries, enter in the Run bar:
regsvr32 schmmgmt.dll
Registration success tips are as follows:
Command Line Input MMC Open the console:
MMC console interface Select files-Add/Remove Snap-ins:
Select the Active Directory schema unit to add and determine:
Right-click the Active Directory Schema options box to select operations master:
E. View the schema master information at this time as follows:
We can query the FSMO role in three ways so that we identify five role host locations before the role migration.
Windows Server 2016-three ways to query FSMO role information