2. contact
The contact object
locates all contacts in Active Directory that match the specified search
criteria. Note that this object doesn't support the samid option for the -o command line switch. This object uses the following syntax:
dsquery contact [{StartNode | forestroot | domainroot}] [-o {dn | rdn}]
[-scope {subtree | onelevel | base}] [-name Name]
[-desc Description] [{-s Server | -d Domain}] [-u UserName]
[-p {Password | *}] [-q] [-r] [-gc] [-limit NumberOfObjects]
[{-uc | -uco | -uci}]
This object doesn't support any specialized command line arguments.
3. group
Use the group object to
locate all groups that match the specified search criteria. In some
cases, this object fails to find the group because you haven't specified
the group criteria correctly. Use the asterisk (*) object when group
searches fail to locate the groups you want to find. This object uses
the following syntax:
dsquery group [{StartNode | forestroot | domainroot}]
[-o {dn | rdn | samid}] [-scope {subtree | onelevel | base}]
[-name Name] [-desc Description] [-samid SAMName]
[{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-q]
[-r] [-gc] [-limit NumberOfObjects] [{-uc | -uco | -uci}]
The following describes the special command line argument.
-samid
SAMName
Searches for groups that have the specified SAM account name.
4. ou (Organizational Unit)
The ou object locates
all organizational units that match the specified search criteria. In
some cases, this object fails to find the organizational unit because
you haven't specified the group criteria correctly. Use the asterisk (*)
object when ou searches fail to locate the organizational unit you want
to find. Note that this object doesn't support the samid option for the -o command line switch. This object uses the following syntax:
dsquery ou [{StartNode | forestroot | domainroot}] [-o {dn | rdn}]
[-scope {subtree | onelevel | base}] [-name Name]
[-desc Description] [{-s Server | -d Domain}] [-u UserName]
[-p {Password | *}] [-q] [-r] [-gc] [-limit NumberOfObjects]
[{-uc | -uco | -uci}]
This object doesn't support any specialized command line arguments.
5. site
The site object
searches for a site that matches the specified search criteria. A site
normally specifies a location or region versus the domain used to
provide a logical separation of computers despite location. Note that
this object supports a limited range of command line arguments. It
doesn't support a starting node selection or a scope. In addition, it
doesn't support the samid option for the -o command line switch. This object uses the following syntax:
dsquery site [-o {dn | rdn}] [-name Name] [-desc Description]
[{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-q]
[-r] [-gc] [-limit NumberOfObjects] [{-uc | -uco | -uci}]
This object doesn't support any specialized command line arguments.
6. server
The server object
locates all servers (rather than all machines) that match the specified
search criteria. This object doesn't support a starting node selection
or a scope. In addition, it doesn't support the samid option for the -o command line switch. This object uses the following syntax:
dsquery server [-o {dn | rdn}] [-forest] [-domain DomainName]
[-site SiteName] [-name Name] [-desc Description]
[-hasfsmo {schema | name | infr | pdc | rid}] [-isgc]
[{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-q]
[-r] [-gc] [-limit NumberOfObjects] [{-uc | -uco | -uci}]
The following list describes each of the command line arguments.
-forest
Searches for all domain controllers (server objects) that are part of the current forest.
-domain
DomainName
Searches for
all server objects that are part of the specified domain. You must use
the DNS name of the domain controller. Don't use this command line
switch when you want to display all of the domain controllers within the
current domain since this is the default setting.
-site
SiteName
Searches for all of the domain controllers (server objects) that appear as part of the specified site.
-hasfsmo {schema | name | infr | pdc | rid}
Searches for the domain controller that holds the requested operations master role. The following list describes each role.
schema
Specifies the schema master of the forest.
name
Specifies the domain-naming master of the forest.,
infr
Specifies the infrastructure master of the forest.
pdc
Specifies the PDC of the domain specified by the -domain command line switch or the current domain when you don't specify a domain.
rid
Specifies the Relative Identifier (RID) master of the domain specified by the -domain command line switch or the current domain when you don't specify a domain.
-isgc
Searches for all Global Catalog (GC) servers in the scope specified by the -forest, -domain, or -site
command line switches. If you don't specify any of the command line
switches that the utility uses to define a scope, the utility locates
all GC servers in the current domain.