Page 1 of 1

Need help in scripting

Posted: 2009-09-29 09:40
by Murashid.Rhaman

can some one help me in righting a script or a way to find out
the number of users in a domain and the amount of storage thay have used for reporting purposes please.

iam not very good in scripting

Re: Need help in scripting

Posted: 2009-09-29 16:18
by mattg
This will report total number of users for a domain, and the total amount of disk space used by the e-mails of that domain, in bytes

Copy this to notepad, and then save as with a .vbs extension. Double click on the saved fiile to run.

Code: Select all

Option Explicit
Dim fso, f, DomName

DomName = ""   ' CHANGE ME

Set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.getfolder("C:\Program Files\hMailServer\Data\" & DomName & "\")

wscript.Echo "Number of users is " & cstr(f.subfolders.count)
wscript.Echo "Amount of disk space used is " & cstr(f.size)
Is that what you need?

Re: Need help in scripting

Posted: 2011-06-27 23:36
by elizb
How it can be possible to do with script, we cannot track others information by the above script, it will be treated as hcak...