共用方式為


Dsadd quota

Applies To: Windows Server 2008

Adds a quota specification to a directory partition. A quota specification determines the maximum number of directory objects that a given security principal can own in a specified directory partition.

Dsadd is a command-line tool that is built into Windows Server 2008. It is available if you have the Active Directory Domain Services (AD DS) or Active Directory Lightweight Directory Services (AD LDS) server role installed. To use dsadd, you must run the dsadd command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

For examples of how to use this command, see Examples.

Syntax

dsadd quota -part <PartitionDN> [-rdn <RelativeDistinguishedName>] -acct <Name> -qlimit <Value> [-desc <Description>] [{-s <Server> | -d <Domain>}] [-u <UserName>] [-p {<Password> | *}] [-q] [{-uc | -uco | -uci}]

Parameters

Parameter Description

-part <PartitionDN>

Required. Specifies the distinguished name of the directory partition on which you want to create a quota. If you do not specify the distinguished name, dsadd takes the name from standard input (stdin).

-rdn <RelativeDistinguishedName>

Specifies the relative distinguished name of the quota specification that you want to create. If you do not specify -rdn, dsadd sets the name to Domain_AccountName by using the domain and account name of the security principal that the -acct parameter specifies.

-acct <Name>

Required. Specifies the security principal (such as a user, group, or computer object, or an InetOrgPerson object) to whom the quota specification applies. You can use any of the following forms for Name:

  • Distinguished name (also known as DN) of the security principal

  • Domain\SAMAccountName of the security principal

-qlimit <Value>

Required. Specifies the number of objects within the directory partition that the security principal can own. To specify an unlimited quota, use -1.

-desc <Description>

Specifies a description for the quota specification that you want to add.

{-s <Server> | -d <Domain>}

Connects the computer to a specified server or domain. By default, dsadd connects the computer to a domain controller in the logon domain.

-u <UserName>

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.contoso.com)

-p {<Password>| *}

Specifies to use a specific password or an asterisk (*) to log on to a remote server. If you type *, dsadd prompts you for a password.

-q

Suppresses all output to standard output (quiet mode).

{-uc | -uco | -uci}

Specifies that dsadd formats output or input data in Unicode. The following list explains each format.

  • -uc: Specifies a Unicode format for input from or output to a pipe (|).

  • -uco : Specifies a Unicode format for output to a pipe (|) or a file.

  • -uci: Specifies a Unicode format for input from a pipe (|) or a file.

/?

Displays help at the command prompt.

Remarks

  • If you do not supply a target object at the command prompt, dsadd obtains the target object from standard input (stdin). Dsadd can accept stdin from the keyboard, from 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).

  • If a value that you use contains spaces, use quotation marks around the text, for example, "CN=DC 2,OU=Domain Controllers,DC=Contoso,DC=Com".

Examples

To specify a quota of 1000 objects for the configuration partition for user MikeDan, type:

dsdd quota -part CN=configuration,dc=contoso,dc=com" -acct MikeDan -qlimit 1000

Additional references

Command-Line Syntax Key

Dsadd

Dsadd computer

Dsadd contact

Dsadd group

Dsadd ou

Dsadd user