Windows 2022
Sponsored Link

File Server : Set Quotas2022/02/10

 
Set Quotas to Volumes or Folders on File Server.
[1] Run PowerShell with Admin Privilege and Configure.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\Administrator> Get-SmbShare 

Name     ScopeName Path        Description
----     --------- ----        -----------
ADMIN$   *         C:\Windows  Remote Admin
C$       *         C:\         Default share
E$       *         E:\         Default share
IPC$     *                     Remote IPC
Share01  *         E:\Share01
ShareAll *         E:\ShareAll

# display templates of Quota
PS C:\Users\Administrator> Get-FsrmQuotaTemplate 

Description           :
Name                  : 100 MB Limit
Size                  : 104857600
SoftLimit             : False
Threshold             : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold}
UpdateDerived         : False
UpdateDerivedMatching : False
PSComputerName        :

Description           :
Name                  : 200 MB Limit Reports to User
Size                  : 209715200
SoftLimit             : False
Threshold             : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold}
UpdateDerived         : False
UpdateDerivedMatching : False
PSComputerName        :
.....
.....

# for example, apply 2 GB hard limit template to [Share01] folder
PS C:\Users\Administrator> New-FsrmQuota -Path "E:\Share01" -Description "limit usage to 2 GB based on template" -Template "2 GB Limit" 

Description     : limit usage to 2 GB based on template
Disabled        : False
MatchesTemplate : True
Path            : E:\Share01
PeakUsage       : 4096
Size            : 2147483648
SoftLimit       : False
Template        : 2 GB Limit
Threshold       : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold}
Usage           : 4096
PSComputerName  :

# if disable applied Quota temporally, set like follows
PS C:\Users\Administrator> Set-FsrmQuota -Path "E:\Share01" -Disabled:$true 

# if enable disabled Quota, set like follows
PS C:\Users\Administrator> Set-FsrmQuota -Path "E:\Share01" -Disabled:$false 

# to remove added Quota entry, set like follows
PS C:\Users\Administrator> Remove-FsrmQuota -Path "E:\Share01" 

Confirm
Are you sure you want to perform this action?
Operation: Delete, Object: quota, Object Identifier (Path): E:\Share01
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
File Server : Set Quotas (GUI)
 
On GUI configuration, set like follows.
[2] Run [Start] - [Server Manager] - [Tools] - [File Server Resource Manager].
[3] Select [Quotas] on the left pane and right-click it, then Open [Create Quota].
[4] Input the Share Path you'd like to set Quota in [Quota path] field.
And Check a box [Create quota on path].
([Auto apply template ****] option is for the auto applied Quota setting, refer to the next page if you'd like to set it)
For Quota properties, Select a templates or set yourself.
(on this example, select a template to proceed)
[5] Confirm selections and if that's OK, Click [Create] button.
[6] Quota entry has just been added.
[7] Verify Quota setting is valid on the Share folder you set Quota. If you try to save files over capacity limit of Quota, an error is shown and you can not save a file like follows.
Matched Content