建立配額範本Create a Quota Template

適用於:Windows Server (半年度管道)、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012、Windows Server 2008 R2Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2

配額範本可定義空間限制、配額類型 (固定或彈性),以及 (選擇性) 一組自動在配額使用量達到定義的閾值等級時產生的通知。A quota template defines a space limit, the type of quota (hard or soft) and optionally, a set of notifications that will be generated automatically when quota usage reaches defined threshold levels.

從範本建立專用配額,即可藉由更新範本來集中管理您的配額,而不需要在每個配額中重複變更。By creating quotas exclusively from templates, you can centrally manage your quotas by updating the templates instead of replicating changes in each quota. 這項功能提供一個可進行所有更新作業的中心點,以簡化存放原則變更的實作。This feature simplifies the implementation of storage policy changes by providing one central point where you can make all updates.

若要建立配額範本To create a Quota Template

  1. 按一下 [配額管理] 中的 [配額範本] 節點。In Quota Management, click the Quota Templates node.

  2. [配額範本] 上按滑鼠右鍵,再按一下 [建立配額範本] (或從 [動作] 窗格中選取 [建立配額範本])。Right-click Quota Templates, and then click Create Quota Template (or select Create Quota Template from the Actions pane). 如此會開啟 [建立配額範本] 對話方塊。This opens the Create Quota Template dialog box.

  3. 如果您要複製現有範本的內容做為新範本的基礎,請從 [從配額範本複製內容] 下拉式清單中選取範本,If you want to copy the properties of an existing template to use as a base for your new template, select a template from the Copy properties from quota template drop-down list. 然後按一下 [複製]Then click Copy.

    無論您選擇使用現有範本的內容或是建立新的範本,都請在 [設定] 索引標籤上修改或設定下列值:Whether you have chosen to use the properties of an existing template or you are creating a new template, modify or set the following values on the Settings tab:

  4. [範本名稱] 文字方塊中,輸入新範本的名稱。In the Template Name text box, enter a name for the new template.

  5. [標籤] 文字方塊中,輸入選用的描述標籤,此標籤將出現在任何衍生自範本的配額旁。In the Label text box, enter an optional descriptive label that will appear next to any quotas derived from the template.

  6. [空間限制] 底下:Under Space Limit:

    • [限制] 文字方塊中,輸入一個數字並選擇單位 (KB、MB、GB 或 TB) 以指定配額的空間限制。In the Limit text box, enter a number and choose a unit (KB, MB, GB, or TB) to specify the space limit for the quota.
    • 按一下 [固定配額][彈性配額] 選項Click the Hard quota or Soft quota option. ([固定配額] 會在達到空間限制後不讓使用者儲存檔案,並且在資料量分別達到各個設定的閾值時產生通知。(A hard quota prevents users from saving files after the space limit is reached and generates notifications when the volume of data reaches each configured threshold. [彈性配額] 則不會強制執行配額限制,不過會產生所有已設定的通知)。A soft quota does not enforce the quota limit, but it generates all configured notifications.)
  7. 您可以為配額範本設定一個或多個選用的閾值通知,如接下來的程序中所述。You can configure one or more optional threshold notifications for your quota template, as described in the procedure that follows. 選取您要使用的所有配額範本內容之後,按一下 [確定] 儲存範本。After you have selected all the quota template properties that you want to use, click OK to save the template.

設定選用閾值通知Setting optional notification thresholds

當磁碟區或資料夾中的儲存空間到您定義的達閾值等級時,檔案伺服器資源管理員可以傳送電子郵件給系統管理員或特定使用者、記錄事件、執行命令或指令碼,或是產生報告。When storage in a volume or folder reaches a threshold level that you define, File Server Resource Manager can send e-mail messages to administrators or specific users, log an event, execute a command or a script, or generate reports. 您可以為每個閾值設定多種通知類型,也可以針對任何配額 (或配額範本) 定義多個閾值。You can configure more than one type of notification for each threshold, and you can define multiple thresholds for any quota (or quota template). 預設不會產生任何通知。By default, no notifications are generated.

例如,您可以設定閾值來傳送電子郵件給有興趣在資料夾達到 85% 配額限制時得悉的系統管理員及使用者,然後在已達配額限制時傳送另一個通知。For example, you could configure thresholds to send an e-mail message to the administrator and the users who would be interested to know when a folder reaches 85 percent of its quota limit, and then send another notification when the quota limit is reached. 此外,您也可能想要執行使用 dirquota.exe 命令的指令碼,自動在到達閾值後提高配額限制。Additionally, you might want to run a script that uses the dirquota.exe command to raise the quota limit automatically when a threshold is reached.

重要

若要傳送電子郵件通知,並使用適用於伺服器環境的參數來設定存放裝置報告時,您必須先設定檔案伺服器資源管理員的一般選項。To send e-mail notifications and configure the storage reports with parameters that are appropriate for your server environment, you must first set the general File Server Resource Manager options. 如需詳細資訊,請參閱設定檔案伺服器資源管理員選項For more information, see Setting File Server Resource Manager Options

若要設定檔案伺服器資源管理員會在到達配額閾值時產生的通知To configure notifications that File Server Resource Manager will generate at a quota threshold

  1. [建立配額範本] 對話方塊的 [通知閾值] 下方,按一下 [新增]In the Create Quota Template dialog box, under Notification thresholds, click Add. [新增閾值] 對話方塊隨即出現。The Add Threshold dialog box appears.

  2. 若要設定產生通知的配額限制百分比:To set a quota limit percentage that will generate a notification:

    [當使用量達到下列數值 (%) 時,產生通知] 文字方塊中,輸入通知閾值的配額限制百分比In the Generate notifications when usage reaches (%) text box, enter a percentage of the quota limit for the notification threshold. (第一次通知閾值的配額限制預設百分比為 85%)。(The default percentage for the first notification threshold is 85 percent.)

  3. 若要設定電子郵件通知:To configure e-mail notifications:

    [電子郵件訊息] 索引標籤上,設定下列選項:On the E-mail Message tab, set the following options:

    • 若要在已達閾值時通知系統管理員,請選取 [將電子郵件傳送給下列系統管理員] 核取方塊,並輸入要接收通知的系統管理帳戶名稱。To notify administrators when a threshold is reached, select the Send e-mail to the following administrators check box, and then enter the names of the administrative accounts that will receive the notifications. 使用 account@domain 格式,並使用分號隔開多個帳戶。Use the format account@domain, and use semicolons to separate multiple accounts.
    • 若要將電子郵件傳送給儲存已達配額閾值之檔案的使用者,請選取 [將電子郵件傳送給超過閾值的使用者] 核取方塊。To send e-mail to the person who saved the file that reached the quota threshold, select the Send e-mail to the user who exceeded the threshold check box.
    • 若要設定訊息,請編輯提供的預設主旨列和郵件內文。To configure the message, edit the default subject line and message body that are provided. 方括弧中的文字會插入關於引發通知之配額事件的變數資訊。The text that is in brackets inserts variable information about the quota event that caused the notification. 例如,[Source Io Owner] 變數會插入儲存已達配額閾值之檔案的使用者的名稱。For example, the [Source Io Owner] variable inserts the name of the user who saved the file that reached the quota threshold. 若要在文字中插入其他變數,請按一下 [插入變數]To insert additional variables in the text, click Insert Variable.
    • 若要設定其他標頭 (包括 [寄件者]、[副本]、[密件副本] 和 [回覆]),請按一下 [其他電子郵件標頭]To configure additional headers (including From, Cc, Bcc, and Reply-to), click Additional E-mail Headers.
  4. 若要記錄事件:To log an event:

    [事件記錄檔]索引標籤上,選取 [將警告傳送給事件記錄檔] 核取方塊,然後編輯預設記錄項目。On the Event Log tab, select the Send warning to event log check box, and edit the default log entry.

  5. 若要執行命令或指令碼:To run a command or script:

    [命令]索引標籤上,選取 [執行這個命令或指令碼] 核取方塊。On the Command tab, select the Run this command or script check box. 然後輸入命令,或按一下 [瀏覽] 以搜尋儲存指令碼所在的位置。Then type the command, or click Browse to search for the location where the script is stored. 您也可以輸入命令引數、選取命令或指令碼的工作目錄,或修改命令安全性設定。You can also enter command arguments, select a working directory for the command or script, or modify the command security setting.

  6. 若要產生一個或多個存放裝置報告:To generate one or more storage reports:

    [報告] 索引標籤上,選取 [產生報告] 核取方塊,並選取要產生的報告On the Report tab, select the Generate reports check box, and then select which reports to generate. (您可以為報告選擇一個或多個系統管理電子郵件收件者,或將電子郵件傳送給已達閾值的使用者)。(You can choose one or more administrative e-mail recipients for the report or e-mail the report to the user who reached the threshold.)

    此報告會儲存在事件報告的預設位置中,您可以在 [檔案伺服器資源管理員選項] 對話方塊中修改預設位置。The report is saved in the default location for incident reports, which you can modify in the File Server Resource Manager Options dialog box.

  7. 按一下 [確定] 以儲存通知閾值。Click OK to save your notification threshold.

  8. 如果您想要設定配額範本的其他通知閾值,請重複這些步驟。Repeat these steps if you want to configure additional notification thresholds for the quota template.

請參閱See also