Share via


Dirquota template modify

Applies To: Windows Server 2008

Modifies a 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 modify /template:<CurrTemplateName> 
   [/new-template:<NewTemplateName>] [/sourcetemplate:<TemplateName>] 
   [/limit:<Limit>[kb | mb | gb]] [/type:{hard | soft}] 
   [/add-threshold:<Level>] [...] [/delete-threshold:<Level>] [...] 
   [/modify-threshold:<OldLevel>,<NewLevel>] [...] 
   [/add-notification:<Level>,<NotifyType>,<ConfigFile>] [...] 
   [/delete-notification:<Level>,<NotifyType>] [...] 
   [/modify-notification:<Level>,<NotifyType>,<ConfigFile>] [...] 
   [/apply:{none | all | matching}] [/remote:<ComputerName>]

Parameters

Parameter Description

/template:<CurrTemplateName>

Modifies the quota template CurrTemplateName. If the template name contains a space, enclose the name in quotation marks.

/new-template:<NewTemplateName>

Renames the quota template to NewTemplateName. If the template name contains a space, enclose the name in quotation marks.

/sourcetemplate:<TemplateName>

Imports quota properties from the quota template TemplateName. If the template name contains a space, enclose the name in quotation marks.

/limit:<Limit>[kb | mb | gb]

Modifies 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}

Modifies the quota type:

  • hard — prevents users from saving files when the limit is reached

  • soft — allows the limit to be exceeded

/add-threshold:<Level>[...]

Adds a notification threshold at percentage Level. You can use this parameter multiple times.

/delete-threshold:<Level> [...]

Deletes a notification threshold and all notifications that were configured at percentage Level. The Level value must be the percentage of a configured notification threshold. You can use this parameter multiple times.

/modify-threshold:<OldLevel>,<NewLevel> [...]

Changes the percentage level of a configured notification threshold. All notifications that were configured at OldLevel will be available at NewLevel. The OldLevel value must be the percentage level of an existing notification threshold. 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 configured notification threshold.

NotifyType must be one of the following:

  • m — an e-mail notification

  • e — an event log notification

  • c — a command or script execution

  • r — a report generation

ConfigFile is the path to the configuration file for the notification. For more information, see Configuration files for notifications in File Server Resource Manager.

Important
If the value specified for NotifyType does not match the value of the Notification parameter in the configuration file, the command will fail with an error.

/delete-notification:<Level>,<NotifyType> [...]

Deletes a notification configured for the notification threshold at percentage Level, of type NotifyType. (For information about NotifyType , see the description of the /add-notification: parameter.) You can use this parameter multiple times.

/modify-notification:<Level>,<NotifyType>,<ConfigFile> [...]

Modifies a notification configured for the notification threshold at percentage Level, of type NotifyType, to be configured according to the information in the configuration file ConfigFile. (For information about NotifyType and ConfigFile, see the description of the /add-notification:.parameter.) You can use this parameter multiple times.

/apply:{none | all | matching}

Defines how the modified quota template is applied to existing quotas derived from the template:

  • none — not applied to derived quotas

  • all — applied to all derived quotas

  • matching — applied only to quotas that match the original template

If you do not use this parameter, by default the modified template is not applied to existing quotas.

/remote:<ComputerName>

Performs the operation on the remote computer ComputerName.

Remarks

  • Quota template properties that are not modified by using command parameters remain unchanged.

  • 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.

    To modify the derived thresholds and notifications, use the /modify-threshold: and /modify-notification: parameters.

  • 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 m /te:"user quota template" /l:60mb
    dirquota template modify /template:"user quota template" /limit:60mb
    
  • To perform operations on a remote computer by using 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 change the space limit for the User Quota template to 1 GB, type:

    dirquota template modify /template:"user quota" /limit:1gb
    
  • To delete the 100-percent threshold and notifications in the User Quota template, type:

    dirquota template modify /template:"user quota" /delete-threshold:100
    

Additional references

Command-Line Syntax Key

Dirquota notification

Dirquota template