&&Force the script to use only defined variables Option Explicit LOCAL sUserName, objGroup, sDomain, sDrive, sGroup, WshNetwork, colDiskQuotas, objMember, objUser *Print the instructions for the user If Wscript.Arguments.Count <1 Then Call Help *Define the variables sGroup = Wscript.Arguments(0) sDrive = Wscript.Arguments(1) Set WshNetwork = WScript.CreateObject("WScript.Network") sDomain = WshNetwork.UserDomain *Create a quota collection and initialize its connection *to the selected drive Set colDiskQuotas = CreateObject("Microsoft.DiskQuota.1") colDiskQuotas.Initialize sDrive&":\", True colDiskQuotas.QuotaState = 2 *Connect to the object representing the group Set objGroup = GetObject _ ("WinNT://" + sDomain + "/" + sGroup &", group") *Apply the quota to each member of that group For each objMember in objGroup.Members Wscript.Echo objMember.Name sUserName = objMember.Name set objUser = colDiskQuotas.AddUser(sUserName) set objUser = colDiskQuotas.FindUser(sUserName) objUser.QuotaThreshold = 9000000 objUser.QuotaLimit = 10000000 Next PROCEDURE Help Wscript.Echo "Instructions" Wscript.Echo "This script sets up disk quotas for a group on a named disk" Wscript.Echo "To run the script, type the name of a group (using quotation marks)" Wscript.Echo "if its name has more than one word) and the drive letter." Wscript.Quit ENDPROC