Today, we discourse some easy workarounds to set Disk Quota in Command Prompt on Windows 10. Earlier we use FAT32 mode to format our disk drives. It has its own advantages & disadvantages. Nowadays, we use the NTFS file system on our PC and it supports disk quotas on Windows NT Operating systems.
This helps System Admins track and control the total access of disk storage usage by users. The administrator can even lay certain principles that restrict users when they have consumed the allotted disk space or are nearby. They can also see reports and use event monitor accordingly to track access disk quota usage bugs.
You can either enable this Disk Quota attribute for a single drive or force apply its settings on all drives. You must sign in as an Admin to make any changes to the allocation of Disk Quota. There are a number of ways using which you can activate this feature. The simplest one is the use of the graphic user interface. However, in certain scenarios, it may not work; hence we will set disk quota using Command Prompt on Windows 10.
Set Disk Quota using Command Prompt in Windows 10
To set Disk Quota in Command Prompt on Windows 10, follow the instructions given below-
- At first, hit the Start button and type cmd in the search field.
- Make a right-click on the well-matched result and select Run as administrator.
This will start an elevated command prompt on your Desktop screen.
- Henceforth, Copy and paste the following command-
fsutil quota track drive_letter:
In the above command, you need to substitute the drive_letter portion with the actual drive letter of your disk for which you want to enable quotas. See the snapshot below-
In case, you want to disable disk quotas; execute the below command followed by the Enter key.
fsutil quota disable drive_letter:
Set Disk Quota Limit and Warning Level
To set a warning level or limit the Disk Quota, follow these steps-
Step-1: Press Win + R hotkey simultaneously to start the Run dialog.
Step-2: Here, type cmd then press Ctrl + Shift + Enter together to open Command Prompt as Admin.
If you want to view the current Disk Limits, type or copy/ paste the below command line-
fsutil quota query drive_letter:
Step-3: Here, replace the drive_letter with the actual drive letter of the disk of which you wanna see the quota limits.
If you want to change disk quota limits, run the following command-
fsutil quota modify drive_letter:warning_level_in_bytes quota_limit_in_bytes user_name
For example: fsutil quota modify D: 18446744073709551615 18446744073709550 sony
In the above example, the first digit figure is the existing quota threshold while the latter is the new set value.
The disk quota limit will automatically reset as per the above figure. If you don’t know the conversion part, you may have a look at these references-
1 Kilobyte (KB) = 1,024 Bytes (B) 1 Megabyte (MB) = 1,048,576 Bytes (B) 1 Gigabyte (GB) = 1,073,741,824 Bytes (B)
Note: You have to replace certain parameters with their actual values.
- Write the actual drive letter i.e. C, D, etc. in place of drive_letter.
- Replace warning_level_in_bytes with a figure that you want to set as the warning level. This must be put in terms of bytes. In case you want to undo the changes, substitute the value data with 0xffffffffffffffff.
- Substitute the quota_limit_in_bytes with some desired quota limit. This again should be in bytes. You can put 0xffffffffffffffff if don’t want to set any limit.
- Moreover, substitute user_name with the actual account username.
Deny disk space to users exceeding quota limit
If you want users to use only a specified quota limit, you can do so by denying the disk space to such users. Here is the procedure-
- Start Command Prompt as an administrator.
- Here, copy/ paste or write the following command line and hit Enter –
fsutil quota enforce drive_letter
- Thereafter, replace the drive_letter part with the actual disk name i.e. C, D, etc.
Now whenever a user reaches the aforementioned disk quota limit, your System will restrict further use of disk for any operations.