JSI Tip 7370. How can I use the command-line to make a domain controller a global catalog server?

Using the DSMOD SERVER, you can make a domain controller a global catalog server, or remove global catalog server status.

When you type dsmod server /?, it tells you how:

Description:  Modifies properties of a domain controller.

Syntax:     dsmod server <ServerDN ...> \[-desc <Description>\]
            \[-isgc \{yes | no\}\] \[\{-s <Server> | -d <Domain>\}\]
            \[-u <UserName>\] \[-p \{<Password> | *\}\] \[-c\] \[-q\]
            \[\{-uc | -uco | -uci\}\]

Parameters:
Value               Description
<ServerDN ...>      Required/stdin. Distinguished names (DNs)
                    of one or more servers to modify.
                    If target objects are omitted they
                    will be taken from standard input (stdin)
                    to support piping of output from another
                    command to input of this command.
-desc <Description>
                    Sets server description to <Description>.
-isgc \{yes | no\}    Sets whether this server to a global catalog server
                    (yes) or disables it (no).
\{-s <Server> | -d <Domain>\}
                    -s <Server> connects to the domain controller (DC)
                    with name <Server>.
                    -d <Domain> connects to a DC in domain <Domain>.
                    Default: a DC in the logon domain.
-u <UserName>       Connect as <UserName>. Default: the logged in user.
                    User name can be: user name, domain\user name,
                    or user principal name (UPN).
-p <Password>       Password for the user <UserName>.
                    If * is entered, then you are prompted for a password.
-c                  Continuous operation mode. Reports errors but
                    continues with next object in argument list
                    when multiple target objects are specified.
                    Without this option, the command exits on first error.
-q                  Quiet mode: suppress all output to standard output.
\{-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:
If a value that you supply contains spaces, use quotation marks
around the text (for example, "CN=My Server,CN=Servers,CN=Site10,
CN=Sites,CN=Configuration,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 enable the domain controllers CORPDC1 and CORPDC9 to become global catalog
servers:

dsmod server
"cn=CORPDC1,cn=Servers,cn=site1,cn=sites,cn=configuration,dc=microsoft,dc=com"
"cn=CORPDC9,cn=Servers,cn=site2,cn=sites,cn=configuration,dc=microsoft,dc=com"
-isgc yes

See also:
dsmod computer /? - help for modifying an existing computer in the directory.
dsmod contact /? - help for modifying an existing contact in the directory.
dsmod group /? - help for modifying an existing group in the directory.
dsmod ou /? - help for modifying an existing ou in the directory.
dsmod server /? - help for modifying an existing domain controller in the
directory.
dsmod user /? - help for modifying an existing user in the directory.
dsmod quota /? - help for modifying an existing quota specification in the
directory
dsmod partition /? - help for modifying an existing partition in the
directory

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.

dsmod failed:The parameter is incorrect.
type dsmod /? for help.



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish