3.15. Enabling Disk Quotas
You want to use disk quotas on an NTFS-formatted filesystem.
Using a graphical user interface
Open Windows Explorer.
Browse to the drive on which you want to enable quotas, right-click it, and select Properties.
Click the Quota tab.
Check the box beside Enable quota management. This turns on disk quota tracking.
Check the box beside Deny disk space to users exceeding quota limit to turn on disk quota enforcement.
Configure the default quota limit if you want to have one.
Under the quota logging options, check the appropriate boxes if you want to have messages logged to the event log every time a user exceeds his quota warning or limit levels.
A dialog box will pop open that informs you the disk needs to be scanned to collect disk statistics. Click OK.
Using a command-line interface
The following command enables disk quota enforcement on drive D:
> fsutil quota enforce d:
The following command enables disk quota tracking on drive D:
> fsutil quota track d:
The following command disables disk quotas on drive D:
> fsutil quota disable d:
You cannot modify the default limit and warning settings with fsutil.
' This code enables disk quotas on a drive. ' This code works on 2003 and XP, but not 2000 systems. ' ------ SCRIPT CONFIGURATION ------ strComputer = "." strDrive = "
<Drive>" ' e.g., D: intEnable = 2 ' 0 = Disabled, 1 = Tracked, 2 = Enforced intDefaultLimit = 1024 * 1024 * 500 ' 500 MB intDefaultWarning = 1024 * 1024 * 400 ' ...