≡ Menu

Manage user disk quotas in Windows

If a computer system is shared by multiple users, then it’s a good practice to enforce disk quotas on users.  If disk usage is not restricted,  if one user stores lot of data, then it might lead to less free space on the disk and eventually causing problems to other users of the computer. This can be avoided by imposing restrictions on each user. In Windows, this can be done using fsutil command.

Enable disk quota

By default, there is not any disk usage restriction on users.  Users can keep any amount of data as long as the disk has free space. To impose disk quotas on a computer, one can run the below command.

fsutil quota enforce drivename

Ex: To enable disk quota on C: drive, the command would  be:

fsutil quota enforce  C:

The next thing we need to do is setting the user quotas. By default, when we enable quotas, each user will have a quota limit of 2^32 – 1 bytes on a Windows 32 bit system. On Windows 64 bit system, it will be 2^64 – 1 bytes.  We need to change this values based on the disk space available and the number of users and their needs.

Set disk quota limits per user

To change user disk quota we can run the below command.

fsutil quota modify drivename   threshold limit  domainname\username

For example, to change the quota for a local user  account ‘John’, the command is:

fsutil quota  modify C: 4096 8192 john

Get disk usage and quota statistics of users

We can get disk usage and quota details by running the following command.

fsutil quota query  drivename

To get the data for C: drive:

fsutil quota query  C:

This command would print user name, quota modified time, disk space used, quota threshold and quota limits for each user of the system.

List violations of disk quota limit

fsutil quota violations

Disable disk quotas

fsutil quota disable drivename
3 comments… add one
  • Soumita

    Thanks for the article. One question, is there any script/tool for sending an email to the administrator whenever there’s a quota breach.

  • Lynette

    awesome blog, do you have twitter or facebook? i will bookmark this page thanks.

  • Burhan Rana

    Great, I’m creating a software in visual basic using this principle to write-protect drive C: and USB flash drive against viruses and that copy themselves from the Flash drive to the drive C: and that copy themselves from drive C: to the flash drive. Please write to me for the software and to test it… thank you :) my Email is: [email protected]. This feature can be very handy if you want to create such concept that deter viruses.

Cancel reply

Leave a Comment