Hi,
I have a script that sets a new warning limit in AD - Exchange General - Storage Limits, Selected lines below:
SetUser.Put "mDBStorageQuota", 471040
SetUser.SetInfo
However, I can't get it to work if I want to use a variable rather than an actual integer. Selected code below:
If theType = 1 and mbxsize >= 460000 then
SetMbxQuotasGroup objUserInstance.Fields("adsPath"), mbxsize +10000, mbxsize +15000, mbxsize +25000
Sub SetMbxQuotasGroup (strGroup, Warning, prohibitSend, prohibitSendRx)
Set SetUser = GetObject(strGroup)
SetUser.Put "mDBUseDefaults", False
wscript.echo Warning
SetUser.Put "mDBStorageQuota", Warning
SetUser.Put "mDBOverQuotaLimit", prohibitSend
SetUser.Put "mDBOverHardQuotaLimit", prohibitSendRx
SetUser.SetInfo
Set SetUser = nothing
End Sub
I can see from the wscript.echo that warning contains the correct number. The error I get is (null):Unspecified Error. I've tried to use PutEx but that didn't seem to work. I'm missing something obvious? Hope you can help?
Thanks in advance
Staro
I have a script that sets a new warning limit in AD - Exchange General - Storage Limits, Selected lines below:
SetUser.Put "mDBStorageQuota", 471040
SetUser.SetInfo
However, I can't get it to work if I want to use a variable rather than an actual integer. Selected code below:
If theType = 1 and mbxsize >= 460000 then
SetMbxQuotasGroup objUserInstance.Fields("adsPath"), mbxsize +10000, mbxsize +15000, mbxsize +25000
Sub SetMbxQuotasGroup (strGroup, Warning, prohibitSend, prohibitSendRx)
Set SetUser = GetObject(strGroup)
SetUser.Put "mDBUseDefaults", False
wscript.echo Warning
SetUser.Put "mDBStorageQuota", Warning
SetUser.Put "mDBOverQuotaLimit", prohibitSend
SetUser.Put "mDBOverHardQuotaLimit", prohibitSendRx
SetUser.SetInfo
Set SetUser = nothing
End Sub
I can see from the wscript.echo that warning contains the correct number. The error I get is (null):Unspecified Error. I've tried to use PutEx but that didn't seem to work. I'm missing something obvious? Hope you can help?
Thanks in advance
Staro