Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
As circumstances change, you might need to adjust the default quota settings on a volume. For example, you might initially give each user up to 100 MB of storage space on a volume. If your department hires new employees, you might have to lower this quota to ensure that all these additional users can store items on the disk. Alternatively, by purchasing a second file server for user data, you might be able to divide your users between the two servers, thus providing them with additional disk space.
Either way, you can use the DiskQuotaControl to change the default quota values for a volume. In addition to changing the quota and warning levels, you can also specify whether you want to record quota violations in the event log.
When you change the default disk quota settings, these new values apply only to new users; they are not applied to users who already have disk quota entries on the volume. For example, suppose you have a volume with the quota entries shown in Table 10.6.
Table 10.6 Sample Disk Quota Entries
Name | Quota Limit | Warning Level |
---|---|---|
KMeyer | 100 MB | 90 MB |
PAckerman | 200 MB | 180 MB |
RWilliams | 400 MB | 350 MB |
If you change the default quota settings to a quota of 50 MB and a warning limit of 40 MB, those values are applied to any new user who saves a file or folder to the column. However, the quota settings for the three users shown in Table 10.6 do not change. The only way to change the quota settings for existing users is to individually bind to each quota entry and then change the value. For more information about this process, see "Modifying a Disk Quota Entry" later in this chapter.
Listing 10.11 contains a script that configures disk quota settings on a computer. To carry out this task, the script must perform the following steps:
The Initialize method requires the following two parameters:
Listing 10.11 Configuring Disk Quota Settings
|
|
Send us your feedback | « Previous | Next » |