Implementing Share Quotas on Windows Server 2012
When users are using too much space on a share, you might want to setup quotas to limit the amount of space they can use. In this doc, you'll see how you can setup a quota and assign it to apply to a share on Windows Server 2012.
Step 1: Installing File Server Resource Manager
The File Server Resource Manager feature is a collection of tools to more efficiently manage resources and quotas. You can install the File Server Resource Manager on Windows Server 2012 if you haven't already by going to the Server Manager. Next, click Manage -> Add Roles and Features
. Select your server and click Next
until you are at the roles installation screen. Expand File and Storage Services, and expand File and iSCSI Services
. Then, tick File Server Resource Manager
to add it to your installation. When asked if you want to install the required features, simply add them and click Next
. There are no features we need to install manually, so we can skip that. Click Install
to install File Server Resource Manager.
Step 2: Adding a Quota Templates
Windows Server uses something called Quota Templates
: these are templates and only become actual quotas once assigned to a folder/share. You can add a Quota Template by opening the File Server Resource Manager on your server, and navigating to Quota Management -> Quota Templates
. In the sidebar, click Create Quota Template...
.
Here, you can copy an existing quota template for an easier setup. For example, if you want to start with a 100 MB limit, select it and click Copy
. This will populate the fields with some basic quotas.
You can give the template a custom name, such as Share Limit
and optionally a description, which is handy if you have lots of Quota Templates setup. The Space Limit can be in KB, MB, GB, or even TB. You can also set the Quota Template to be either a "hard", or "soft" quota. With a hard quota, the quota setup is the limit and users will not be able to exceed it. With a soft quota, it's not the limit and the user will be able to exceed it, but you will receive a notification.
You can setup notification thresholds to automatically notify an administrator when a user exceeds their limit or reaches a percentage of it so the administrator can monitor usage. The default notification thresholds are 85%, 95%, and 100%. Simply select a notification threshold and click Edit...
to see its settings and optionally change them. For example, if you want to be notified when a user reaches 90% of their limit, you can change the existing percentage to 90% or create a new notification threshold. In the overview, you can see what happens when the threshold is reached (send e-mail, log in event log, execute command, and report). You can also remove notification thresholds.
You can add the Quota Template by clicking OK
.
Step 3: Assigning the quota
After the Quota Template has been created, you can assign the quota to a share. This must be a share as it will need to show up in Server Manager. Open Server Manager, and navigate to Server Manager\File and Storage Services\Shares
.
Right-click your share, and click Configure Quota...
. You will now see a list with all available Quota Templates, including the one you have just created. Select a quota, and click OK
.
Congratulations! Your quota has now been setup!