本篇文章主要介绍了"hmailserver导出所有域的用户列表",主要涉及到hmailserver方面的内容,对于系统运维感兴趣的同学可以参考一下:
将内容复制到txt文件中后缀改为vbs将用户名密码替换为自己的脚本内容如下:Option ExplicitConst HMSADMINUSER = "admin...
将内容复制到txt文件中后缀改为vbs
将用户名密码替换为自己的
脚本内容如下:
Option Explicit
Const HMSADMINUSER = "administrator"
Const HMSADMINPWD = "password" ' ***CHANGE ME
Dim oApp, oDomain, oAccount, list
Set oApp = CreateObject("hMailServer.Application")
Call oApp.Authenticate(HMSADMINUSER, HMSADMINPWD)
For oDomain = 0 to oApp.DOmains.count-1
list = list & oApp.Domains.item(oDomain).name & VBNewLine
For oAccount = 0 to oApp.Domains.item(oDomain).Accounts.count-1
list = list & " " & oApp.Domains.item(oDomain).Accounts.item(oAccount).address & VBNewLine
Next 'oAccount
Next ' oDomain
wscript.echo list
将输出至文本
执行即可
cscript.exe //NoLogo "C:\path\to\your.vbs" >"C:\output.txt"
以上就介绍了hmailserver导出所有域的用户列表,包括了hmailserver方面的内容,希望对系统运维有兴趣的朋友有所帮助。
本文网址链接:http://www.codes51.com/article/detail_1163133.html