Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
June 28, 2004
When you use the dsquery server -hasfsmo infr command, in Windows Server 2003, to display the Infrastructure Master FSMO (Flexible Single Master Operations ) role holder, it returns the PDC Emulator role holder.
To workaround this problem behavior, use the following command instead:
Dumpfsmos
NOTE: See Another way to test if a domain controller is a Global Catalog server?
NOTE: The DSQUERY SERVER /? command returns:
Description: Finds domain controllers according to specified search criteria.Syntax: dsquery server [-o {dn | rdn}] [-forest] [-domain ] [-site ] [-name ] [-desc ] [-hasfsmo {schema | name | infr | pdc | rid}] [-isgc] [{-s | -d }] [-u ] [-p { | *}] [-q] [-r] [-gc] [-limit ] [{-uc | -uco | -uci}]Parameters:Value Description-o {dn | rdn} Specifies output format. Default: distinguished name (DN).-forest Finds all domain controllers (DCs) in the current forest.-domain Finds all DCs in the domain with a DNS name matching .-site Finds all DCs that are part of site .-name Finds DCs with names matching the value given by , e.g., "NA*" or "Europe*" or "j*th".-desc Finds DCs with descriptions matching the value given by , e.g., "corp*" or "j*th".-hasfsmo {schema | name | infr | pdc | rid} Finds the DC that holds the specified Flexible Single-master Operation (FSMO) role. (For the "infr," "pdc" and "rid" FSMO roles, if no domain is specified with the -domain parameter, the current domain is used.)-isgc Find all DCs that are also global catalog servers (GCs) in the scope specified (if the -forest, -domain or -site parameters are not specified, then find all GCs in the current domain are used).{-s | -d } -s connects to the domain controller (DC) with name . -d connects to a DC in domain . Default: a DC in the logon domain.-u Connect as . Default: the logged in user. User name can be: user name, domainuser name, or user principal name (UPN).-p Password for the user . If * then prompt for password.-q Quiet mode: suppress all output to standard output.-r Recurse or follow referrals during search. Default: do not chase referrals during search.-gc Search in the Active Directory global catalog.-limit Specifies the number of objects matching the given criteria to be returned, where is the number of objects to be returned. If the value of is 0, all matching objects are returned. If this parameter is not specified, by default the first 100 results are displayed.{-uc | -uco | -uci} -uc Specifies that input from or output to pipe is formatted in Unicode. -uco Specifies that output to pipe or file is formatted in Unicode. -uci Specifies that input from pipe or file is formatted in Unicode.Remarks:The dsquery commands help you find objects in the directory that matcha specified search criterion: the input to dsquery is a search criteriaand the output is a list of objects matching the search. To get theproperties of a specific object, use the dsget commands (dsget /?).If a value that you supply contains spaces, use quotation marksaround the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").If you enter multiple values, the values must be separated by spaces(for example, a list of distinguished names).Examples:To find all DCs in the current domain: dsquery serverTo find all DCs in the forest and display theirRelative Distinguished Names: dsquery server -o rdn -forestTo find all DCs in the site whose name is "Latin-America", and display theirRelative Distinguished Names: dsquery server -o rdn -site Latin-AmericaFind the DC in the forest that holds the schema FSMO role: dsquery server -forest -hasfsmo schemaFind all DCs in the domain example.microsoft.com that areglobal catalog servers: dsquery server -domain example.microsoft.com -isgcFind all DCs in the current domain that hold a copy of a given directorypartition called "ApplicationSales": dsquery server -part "Application*"See also:dsquery computer /? - help for finding computers in the directory.dsquery contact /? - help for finding contacts in the directory.dsquery subnet /? - help for finding subnets in the directory.dsquery group /? - help for finding groups in the directory.dsquery ou /? - help for finding organizational units in the directory.dsquery site /? - help for finding sites in the directory.dsquery server /? - help for finding servers in the directory.dsquery user /? - help for finding users in the directory.dsquery quota /? - help for finding quotas in the directory.dsquery partition /? - help for finding partitions in the directory.dsquery * /? - help for finding any object in the directory by using ageneric LDAP query.Directory Service command-line tools help:dsadd /? - help for adding objects.dsget /? - help for displaying objects.dsmod /? - help for modifying objects.dsmove /? - help for moving objects.dsquery /? - help for finding objects matching search criteria.dsrm /? - help for deleting objects.dsquery failed:The parameter is incorrect.type dsquery /? for help.
You May Also Like