Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Dsget
Displays the selected properties of a specific object in the directory. The dsget commands include:
• dsget computer
• dsget contact
• dsget group
• dsget ou
• dsget server
• dsget user
• dsget subnet
• dsget site
• dsget quota
• dsget partition
dsget computer
Displays the properties of a computer in the directory. There are two variations of this command. The first variation allows you to view the properties of multiple computers. The second variation
allows you to view the membership information of a single computer.
Syntax
dsget computerComputerDN ...[-dn] [-samid][-sid][-desc][-loc][-disabled][{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco |
-uci}][-partPartitionDN[-qlimit][-qused]]
dsget computerComputerDN[-memberof [-expand]][{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}]
Parameters
ComputerDN ...
Required. Specifies the distinguished names of the computer object list that you want to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output
from another command to input of this command. Compare with ComputerDN in the next command variation.
-dn
-samid
-sid
-desc
-loc
-disabled
Displays the status of the computer accounts. A value yes returned establishes that the account is disabled; a value of no establishes that the account is enabled.
ComputerDN
Required. Specifies the distinguished name of the single computer you want to view.
-memberof
Displays the immediate list of groups of which the computer is a member. This takes a single target object only as input parameter.
-expand
Displays the recursively expanded list of groups of which the computer is a member. This option takes the immediate group membership list of the computer and then recursively expands each
group in this list to determine its group memberships as well to arrive at a complete closure set of the groups.
{ -sServer| -dDomain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-uUserName
Specifies the user name with which the user logs on to a remote server. By default, -u uses the user name with which the user logged on. You can use any of the following formats to specify a
user name:user name (for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com)
-p{ Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first
error.
-q
-l
Displays entries in a list format. By default, entries are displayed in a table format.
{ -uc| -uco| -uci}
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.
-partPartitionDN
-qlimit
Displays the effective quota of the computer within the specified directory partition.
-qused
Displays how much of its quota the computer has used within the specified directory partition.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe (|).-ucoSpecifies a
Unicode format for output to a pipe (|) or a file. -uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not supply a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use the end-of-file character (CTRL+Z).
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related Topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties. See Examples.
• If a value that you supply contains spaces, use quotation marks around the text (for example, "CN=DC2,OU=Domain Controllers,DC=Microsoft,DC=Com").
• If you supply multiple values for a parameter, use spaces to separate the values (for example, a list of distinguished names).
Examples
To display the descriptions of all computers in a given organizational unit whose name starts with "tst", type:
To display the list of groups, recursively expanded, to which a given computer "MyDBServer" belongs, type:
Top of page
dsget contact
Displays the various properties of a contact in the directory.
Syntax
dsget contactContactDN ...[-dn][-fn][-mi][-ln][-display][-desc][-office][-tel][-email][-hometel][-pager][-mobile][-fax][-iptel][-title][-dept][-company][{-sServer |
-dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}]
Parameters
ContactDN ...
Required. Specifies the distinguished names of the contact objects that you want to view. If this parameter is omitted, its value is taken from standard input (stdin) to support piping of output
from another command to input of this command.
-dn
-fn
-mi
-ln
-display
-desc
-office
-tel
-hometel
-pager
-mobile
-fax
-iptel
Displays the IP phone number of the contact.
-title
-dept
-company
{ -sServer| -dDomain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-uUserName
Specifies the user name with which the user logs on to a remote server. By default, -u uses the user name with which the user logged on. You can use any of the following formats to specify a
user name:user name (for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com)
-p{ Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first
error.
-q
-l
Displays entries in a list format. By default, entries are displayed in a table format.
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe
(|).-ucoSpecifies a Unicode format for output to a pipe (|) or a file. -uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not supply a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use the end-of-file character (CTRL+Z).
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties.
• If a value that you supply contains spaces, use quotation marks around the text (for example, "CN=Mike Danseglio,OU=Contacts,DC=Microsoft,DC=Com").
• If you supply multiple values for a parameter, use spaces to separate the values (for example, a list of distinguished names).
Examples
To display the description and phone numbers for contacts Mike Danseglio and Don Funk, type:
Top of page
dsget group
Displays the various properties of a group including the members of a group in the directory. There are two variations of this command. The first variation allows you to view the properties of
multiple groups. The second variation allows you to view the group membership information of a single group.
Syntax
dsget groupGroupDN ...[-dn][-samid][-sid][-desc][-secgrp][-scope][{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l][{-uc | -uco |
-uci}][-partPartitionDN[-qlimit][-qused]]
dsget groupGroupDN[{-memberof | -members}][-expand][{-sServer | -dDomain}][-uUserName][-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}]
Parameters
GroupDN ...
Required. Specifies the distinguished names of the group objects that you want to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output from
another command to input of this command. Compare with GroupDN in the next command variation.
-dn
-samid
-sid
-desc
-secgrp
Displays information about whether groups are security groups (yes) or a distribution groups (no).
-scope
Display information about whether group scopes are local, global, or universal.
GroupDN
Required. Specifies the distinguished name of the computer you want to view.
{ -memberof| -members}
Displays the immediate list of groups of which the group is a member (-memberof). Displays the immediate list of members of the group (-members).
-expand
In the case of the -memberof parameter, requests that the recursively expanded list of groups in which the group is a member be returned. This option takes the immediate group membership
list of the group, and then recursively expands each group in this list to determine its group memberships as well to arrive at a complete closure set of the groups.In case of the-members
parameter, requests that the recursively expanded list of members of the group be displayed. This parameter takes the immediate list of members of the group and then recursively expands each
group in this list to determine its group memberships as well to arrive at a complete closure set of the members.
{ -sServer| -dDomain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-uUserName
Specifies the user name with which the user logs on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the following formats:user name
(for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com)
-p{ Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first
error.
-q
-l
Displays entries in a list format. By default, entries are displayed in a table format.
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.
-partPartitionDN
-qlimit
Displays the effective quota of the group within the specified directory partition.
-qused
Displays how much of its quota the group has used within the specified directory partition.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe (|).-ucoSpecifies a
Unicode format for output to a pipe (|) or a file. -uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not supply a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use the end-of-file character (CTRL+Z).
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related Topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties. See Examples.
• If a value that you supply contains spaces, use quotation marks around the text (for example, "CN=USA Sales,OU=Distribution Lists,DC=Microsoft,DC=Com").
• If you supply multiple values for a parameter, use spaces to separate the values (for example, a list of distinguished names).
Examples
To display the descriptions of all groups in a given organizational unit whose names start with "adm," type:
To display the list of members, recursively expanded, of the group Backup Operators, type:
Top of page
dsget ou
Displays the various properties of an organizational unit in the directory.
Syntax
dsget ouOrganizationalUnitDN ...[-dn] [-desc][{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}]
Parameters
OrganizationalUnitDN ...
Required. Specifies the distinguished names of the organizational units that you want to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output
from another command to input of this command.
-dn
-desc
{ -sServer| -dDomain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-uUserName
Specifies the user name with which the user logs on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the following formats:user name
(for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com)
-p{ Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first
error.
-q
-l
Displays entries in a list format. By default, entries are displayed in a table format.
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe
(|).-ucoSpecifies a Unicode format for output to a pipe (|) or a file. -uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not supply a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use the end-of-file character (CTRL+Z).
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related Topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties. See Examples.
• If a value that you supply contains spaces, use quotation marks around the text (for example, "OU=Domain Controllers,DC=Microsoft,DC=Com").
• If you supply multiple values for a parameter, use spaces to separate the values (for example, a list of distinguished names).
Examples
To display the descriptions of all organizational units in the current domain, type:
Top of page
dsget server
This command displays the various properties of a domain controller defined in the directory. There are three variations of this command. The first variation displays the general properties of a
specified domain controller. The second variation displays a list of the security principals who own the largest number of directory objects on the specified domain controller. The third variation
displays the distinguished names of the directory partitions on the specified server.
Syntax
dsget serverServerDN ...[-dn] [-desc] [-dnsname] [-site] [-isgc][{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}]
dsget serverServerDN[{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}][-topobjownerDisplay]
dsget serverServerDN[{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}][-partPartitionDN]
Parameters
ServerDN ...
Required. Specifies the list of server object distinguished names to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output from another
command to input of this command.
-dn
-desc
-dnsname
-site
-isgc
Displays information about whether the server is a global catalog (yes) or not (no).
{ -sServer| -dDomain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-uUserName
Specifies the user name with which the user logs on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the following formats:user name
(for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com)
-p{ Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first
error.
-q
-l
Displays entries in a list format. By default, entries are displayed in a table format.
-partPartitionDN
-topobjownerDisplay
Displays a sorted list of the security principals (users, computers, security groups, and inetOrgPersons) that own the largest number of directory objects across all directory partitions on the
server and the number of directory objects that they own. The number of accounts to display in the list is specified by Display.To display all object owners, type 0. If you do not specify Display,
the number of principals listed defaults to 10.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe (|).-ucoSpecifies a Unicode format for output to a pipe (|) or a file.
-uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not supply a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use the end-of-file character (CTRL+Z).
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related Topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties. See Examples.
• 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 supply multiple values for a parameter, use spaces to separate the values (for example, a list of distinguished names).
• The properties requested by this command may reside either in the Server object for the domain controller or in the NTDSDSA object corresponding to the server.
Examples
To find all domain controllers for domain widgets.microsoft.com and display their DNS host name and site name, type:
To show if a domain controller with the name DC1 is also a global catalog server, type:
To display a sorted list of security principals who own the largest number of objects on the domain controller server1.widgets.microsoft.com, type:
Top of page
dsget user
Display the various properties of a user in the directory. There are two variations of this command. The first variation allows you to view the properties of multiple users. The second variation allows
you to view the group membership information of a single user.
Syntax
dsget userUserDN ...[-dn][-samid] [-sid][-upn] [-fn] [-mi] [-ln] [-display] [-empid][-desc][-office] [-tel] [-email] [-hometel] [-pager] [-mobile][-fax]
[-iptel][-webpg][-title][-dept][-company][-mgr][-hmdir][-hmdrv][-profile][-loscr][-mustchpwd][-canchpwd][-pwdneverexpires][-disabled][-acctexpires][-reversiblepwd][{-uc |
-uco | -uci}][-partPartitionDN[-qlimit][-qused]]
Parameters
UserDN ...
Required. Specifies the distinguished names of the user objects that you want to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output from
another command to input of this command. Compare with UserDN in the next command variation.
-dn
-samid
-sid
-upn
-fn
-mi
-ln
-display
-empid
-desc
-full
-office
Displays the office locations of the users.
-tel
-hometel
-pager
-mobile
-fax
-iptel
-webpg
-title
-dept
-company
-mgr
-hmdir
Displays the drive letter to which the home directory of the user is mapped to if the home directory path is a UNC path.
-hmdrv
Displays the user's home drive letter if home directory is a UNC path.
-profile
-loscr
-mustchpwd
Displays information about whether users must change their passwords at the time of next logon (yes) or not (no).
-canchpwd
Displays information about whether users can change their password (yes) or not (no).
-pwdneverexpires
Displays information about whether the user passwords never expires (yes) or not (no).
-disabled
Displays information about whether user accounts are disabled for logon (yes) or not (no).
-acctexpires
Displays dates indicating when user accounts expire. If the accounts never expire, never is displayed.
-reversiblepwd
Displays information about whether the user passwords are allowed to be stored using reversible encryption (yes) or not (no).
UserDN
Required. Specifies the distinguished name of the user you want to view.
-memberof
-expand
Displays the recursively expanded list of groups of which the user is a member. This option takes the immediate group membership list of the user, and then recursively expands each group in
this list to determine its group memberships as well to arrive at a complete closure set of the groups.
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.
-partPartitionDN
-qlimit
Displays the effective quota of the user within the specified directory partition.
-qused
Displays how much of the quota the user has used within the specified directory partition.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe (|).-ucoSpecifies a
Unicode format for output to a pipe (|) or a file. -uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not supply a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use the end-of-file character (CTRL+Z).
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related Topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties. See Examples.
• The -canchpwd is an estimate on whether the user is allowed to change his password. This estimate has to do with the way the access control lists (ACLs) on the object are interpreted in
order to arrive at the yes or no answer. The precise certainty regarding a user's ability to change a password can only be known by trying to change the password. This non-authoritative
answer is not specific to this command-line tool, but is also inherent in the User Properties dialog box in Active Directory Users and Computers in Microsoft Management Console (MMC).
• When none of the specific property parameters are specified for the dsget user command, the default set of user properties to display include the following: distinguished name, SAM account
name, and description.
• When the -memberof parameter is specified, it overrides all other parameters and only the membership list for the user is displayed.
Examples
To find all users in a given organizational unit whose name starts with "jon" and show their descriptions, type:
To show the list of groups, recursively expanded, to which a given user "Mike Danseglio" belongs, type:
Top of page
dsget subnet
Displays properties of a subnet defined in the directory.
Syntax
dsget subnetSubnetDN ...[-dn][-desc] [-loc] [-site][{-sServer | -dDomain}][-uUserName] [-p {Password | *}][-c][-q][-l] [{-uc | -uco | -uci}]
Parameters
SubnetDN ...
Required. Specifies the common names of one or more subnets that you want to view.
-dn
Displays the distinguished names of the subnets. If values are omitted, they are obtained through standard input (stdin) to support piping of output from another command to input of this
command.
-desc
-loc
-site
{ -sServer| -dDomain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-uUserName
Specifies the user name with which the user logs on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the following formats:user name
(for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com)
-p{ Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first
error.
-q
-l
Displays entries in a list format. By default, entries are displayed in a table format.
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe
(|).-ucoSpecifies a Unicode format for output to a pipe (|) or a file. -uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not supply a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use the end-of-file character (CTRL+Z).
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related Topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties.
• If a value that you supply contains spaces, use quotation marks around the text.
• If you supply multiple values for a parameter, use spaces to separate the values (for example, a list of subnet common names).
Examples
To display all relevant properties for the subnets 206.73.118.0/24 and 207.209.68.0/24, type:
dsget subnet "206.73.118.0/24" "207.209.68.0/24"
Top of page
dsget site
Displays the various properties of a site defined in the directory.
Syntax
dsget site SiteCN ...[-dn] [-desc] [-autotopology] [-cachegroups] [-prefGCsite][{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}]
Parameters
SiteCN ...
Required. Specifies the common name of one or more sites that you want to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output from another
command to input of this command.
-dn
-desc
-autotopology
Displays information about whether automatic intersite topology generation is enabled (yes) or disabled (no) for specified sites.
-cachegroups
Displays information about whether caching of universal group memberships for this site is enabled (yes) or disabled (no) to support logons that do not check the global catalog.
-prefGCsite
Displays the name of the preferred global catalog site used to refresh universal group membership caching for this site’s domain controllers, if universal group membership caching has been
enabled.
{ -sServer| -dDomain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-uUserName
Specifies the user name with which the user logs on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the following formats:user name
(for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com)
-p{ Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first
error.
-q
-l
Displays entries in a list format. By default, entries are displayed in a table format.
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe
(|).-ucoSpecifies a Unicode format for output to a pipe (|) or a file. -uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not supply a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use the end-of-file character (CTRL+Z).
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related Topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties. See Examples.
• If a value that you supply contains spaces, use quotation marks around the text (for example, "CN=Mike Danseglio,CN=Users,DC=Microsoft,DC=Com").
• If you supply multiple values for a parameter, use spaces to separate the values (for example, a list of distinguished names).
Examples
To find all sites in the forest and display their descriptions, type:
Top of page
dsget quota
Displays the properties of a quota specification defined in the directory. A quota specification determines the maximum number of directory objects a given security principal can own in a specific
directory partition.
Syntax
dsget quotaObjectDN ... [-dn] [-acct] [-qlimit] [{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}]
Parameters
ObjectDN...
Required. Specifies the distinguished names of the quota objects to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output from another
command to input of this command.
-dn
-acct
Displays the distinguished names of the accounts to which the quotas are assigned.
-qlimit
Displays the quota limits for the specified quotas. An unlimited quota displays as "-1".
{ -sServer| -dDomain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-uUserName
Specifies the user name with which the user logs on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the following formats: user name
(for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com)
-p{ Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first
error.
-q
-l
Displays entries in a list format. By default, entries are displayed in a table format.
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe
(|).-ucoSpecifies a Unicode format for output to a pipe (|) or a file. -uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not specify a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use CTRL+Z for End of File (EOF).
• If you do not specify any of the optional parameters, the distinguished names of the quota specifications, the accounts to which the quotas are assigned, and the quota limits are all displayed.
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related Topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties. For more information, see the Examples section of this topic.
• If a value that you use contains spaces, use quotation marks around the text (for example, "CN=Mike Danseglio,CN=Users,DC=Microsoft,DC=Com").
• If you use multiple values for a parameter, use spaces to separate the values (for example, a list of distinguished names).
Examples
To display the account to which the quota is assigned, and the quota limit for the quota specification "CN=quota1,dc=marketing,dc=northwindtraders,dc=com", type:
Top of page
dsget partition
Displays the properties of a directory partition.
Syntax
dsget partitionObjectDN ... [-dn] [-qdefault] [-qtmbstnwt] [-topobjownerDisplay] [{-sServer | -dDomain}][-uUserName] [-p {Password | *}] [-c][-q][-l] [{-uc | -uco | -uci}]
Parameters
ObjectDN...
Required. Specifies the distinguished names (also known as DN) of the partition objects to view. If values are omitted, they are obtained through standard input (stdin) to support piping of output
from another command to input of this command.
-dn
-qdefault
Displays the default quota that applies to any security principal (for example, user, group, computer, or iNetOrg person) creating an object in the directory partition, if no specific quota
specification governs that security principal. An unlimited quota displays as "-1".
-qtmbstnwt
Displays the percent by which the tombstone object count should be reduced when calculating quota usage.
-topobjownerDisplay
Displays a sorted list of the security principals (users, computers, security groups, and inetOrgPersons) that own the largest number of objects in the specified directory partition and the number
of directory objects that they own. The number of accounts to display in the list is specified by Display. To display all object owners, type 0. If you do not specify Display, the number of principals
listed defaults to 10.
{ -sServer| -dDomain}
Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain.
-uUserName
Specifies the user name with which the user logs on to a remote server. By default, the logged on user name is used. You can specify a user name using one of the following formats:user name
(for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com)
-p{ Password | *}
Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
-c
Reports errors, but continues with the next object in the argument list when multiple target objects are specified (continuous operation mode). Without this option, the command exits on the first
error.
-q
-l
Displays entries in a list format. By default, entries are displayed in a table format.
Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.ValueDescription-ucSpecifies a Unicode format for input from or output to a pipe
(|).-ucoSpecifies a Unicode format for output to a pipe (|) or a file. -uciSpecifies a Unicode format for input from a pipe (|) or a file.
/?
Remarks
• If you do not specify a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as
piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use CTRL+Z for End of File (EOF).
• When none of the optional parameters is specified, the distinguished name of the directory partition object is displayed.
• When -topobjowner is specified, it overrides any other specified parameters, so that only the results of -topobjowner are displayed.
• Use the dsget command to view properties of a specific object in the directory. For more information about using dsquery * to search for all objects that match a specific criterion, see
Related Topics.
• As a result of dsquery searches, you can pipe returned objects to dsget and obtain object properties. For more information, see the Examples section of this topic.
• If a value that you use contains spaces, use quotation marks around the text (for example, "CN=Mike Danseglio,CN=Users,DC=Microsoft,DC=Com").
• If you use multiple values for a parameter, use spaces to separate the values (for example, a list of distinguished names).
Examples
To display all directory partitions in the forest northwindtraders.com that begin with "application" along with the top three object owners from each partition, type:
"CN=quota1,dc=marketing,dc=northwindtraders,dc=com", type:
dsquery server -forest -part application* | dsget server -part | dsget partition -topjobowner 3
Top of page
Formatting legend
Format Meaning
Ellipsis (...) Parameter that can be repeated several times in a command line
Between braces ({}); choices separated by pipe (|). Example: {even|odd} Set of choices from which the user must choose only one
Related Links
• Directory service
command-line tools
• Dsquery
• Command-line reference A-Z
• Command shell overview
© 2008 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement