Need help in scripting

This section contains scripts that hMailServer has contributed with. hMailServer 4 is needed to use these.
Post Reply
Murashid.Rhaman
New user
New user
Posts: 28
Joined: 2009-09-24 08:14

Need help in scripting

Post by Murashid.Rhaman » 2009-09-29 09:40

Hi,

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

User avatar
mattg
Moderator
Moderator
Posts: 20639
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Need help in scripting

Post by mattg » 2009-09-29 16:18

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 = "yourdomain.com"   ' 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?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

elizb
New user
New user
Posts: 1
Joined: 2011-05-27 20:36
Contact:

Re: Need help in scripting

Post by elizb » 2011-06-27 23:36

How it can be possible to do with script, we cannot track others information by the above script, it will be treated as hcak...
Stacey
www.KiwiServices.com

Post Reply