Dirquota template add
Applies To: Windows Server 2008, Windows Server 2012
Creates and configures a new quota template.
Note
To use this command, you must be logged on as an administrator or a member of the Administrators group.
For examples of how to use this command, see Examples.
Syntax
dirquota template add /template:<NewTemplateName>
{/sourcetemplate:<TemplateName> | /limit:<Limit>[kb | mb | gb]}
[/type:{hard | soft}] [/add-threshold:<Level>] [...]
[/add-notification:<Level>,<NotifyType>,<ConfigFile>] [...]
[/remote:<ComputerName>]
Parameters
Parameter |
Description |
||
---|---|---|---|
/template:<NewTemplateName> |
Creates a quota template with name NewTemplateName. If the template name contains a space, enclose the name in quotation marks. |
||
/sourcetemplate:<TemplateName> |
Derives template properties from the quota template TemplateName. If the template name contains a space, enclose the name in quotation marks. |
||
/limit:<Limit>[kb | mb | gb] |
Specifies the space limit for the quota template. By default, Limit is denoted in kilobytes (KB), but you can append kb, mb, or gb to the number to specify the unit. |
||
/type:{hard | soft} |
Specifies quota type:
If the quota type is not derived from/sourcetemplate:TemplateName or is not specified, a hard limit is configured by default. |
||
/add-threshold:<Level> [...] |
Adds a notification threshold at percentage Level. You can use this parameter multiple times. |
||
/add-notification:<Level>,<NotifyType>,<ConfigFile>] [...] |
Adds a notification to the notification threshold at percentage Level, of type NotifyType, configured according to the information in the configuration file ConfigFile. You can use this parameter multiple times. Level must be the percentage of a notification threshold configured using the /add-threshold parameter. NotifyType must be one of the following:
ConfigFile is the path to the configuration file for the notification. For more information, see Configuration files for notifications in File Server Resource Manager.
|
||
/remote:<ComputerName> |
Performs the operation on the remote computer ComputerName. |
Remarks
The **/sourcetemplate:**TemplateName parameter derives the following properties from the quota template TemplateName:
Space limit
Quota type (hard or soft)
Notification thresholds and notifications (if configured)
You can override the space limit and quota type values of the quota template by using the /limit: and /type: parameters. Also, you can use the /add-notification: parameter to add a notification to any notification threshold derived from TemplateName.
The shortest sequence of characters that uniquely identifies a parameter can be used as an abbreviation. For example, the following two commands are equivalent:
dirquota t a /te:"User Quota" /s:"100 MB Limit" dirquota template add /template:"User Quota" /sourcetemplate:"100 MB Limit"
To perform operations on a remote computer with the **/remote:**ComputerName parameter:
You must be logged on with a domain account that is a member of the Administrators group on both the local computer and the remote computer.
The remote computer must be running Windows Server 2008, and File Server Resource Manager must be installed.
The Remote File Server Resource Manager Management exception on the remote computer must be enabled. You enable this exception by using Windows Firewall in Control Panel.
Examples
To create the User Quota template configured with a hard space limit of 500 MB and an e-mail notification (configured with the file quotaexceeded.txt) when the limit is reached, type:
dirquota template add /template:"User Quota" /limit:500mb /add-threshold:100 /add-notification:100,m,quotaexceeded.txt
To create the User Quota 250 template by using the properties of the User Quota template, but with a soft space limit of 250 MB, type:
dirquota template add /template:"User Quota 250" /sourcetemplate:"User Quota" /limit:250mb /type:soft