切换到宽版
  • 5182阅读
  • 0回复

[求助]使用脚本返回邮箱信息 [复制链接]

上一主题 下一主题
 
只看楼主 倒序阅读 0楼  发表于: 2011-03-09
— 本帖被 YOYO 从 Exchange 脚本中心 移动到本区(2015-06-25) —
  • 脚本环境:Visual Basic
  • 适合版本:Exchange 2003
  • 适用平台:
  • 脚本作用:运行些脚本可以返回正在运行的Exchange 2003的邮箱信息。

On Error Resume Next


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & _
        "\ROOT\MicrosoftExchangeV2")


Set colItems = objWMIService.ExecQuery _
    ("Select * from Exchange_Mailbox")


For Each objItem in colItems
    Wscript.Echo "Associated content count: " & _
        objItem.AssocContentCount
    Wscript.Echo "Date discovered absent in directory service: " & _
        objItem.DateDiscoveredAbsentInDS
    Wscript.Echo "Delete messages size extended: " & _
        objItem.DeletedMessageSizeExtended
    Wscript.Echo "Last logged-on user account: " & _
        objItem.LastLoggedOnUserAccount
    Wscript.Echo "Last logoff time: " & objItem.LastLogoffTime
    Wscript.Echo "Last logon time: " & objItem.LastLogonTime
    Wscript.Echo "Legacy distinguished name: " & objItem.LegacyDN
    Wscript.Echo "Mailbox display name: " & _
        objItem.MailboxDisplayName
    Wscript.Echo "Mailbox GUID: " & objItem.MailboxGUID
    Wscript.Echo "Server name: " & objItem.ServerName
    Wscript.Echo "Size: " & objItem.Size
    Wscript.Echo "Storage group name: " & _
        objItem.StorageGroupName
    Wscript.Echo "Storage limit information: " & _
        objItem.StorageLimitInfo
    Wscript.Echo "Store name: " & objItem.StoreName
    Wscript.Echo "Total items: " & objItem.TotalItems
    Wscript.Echo
Next


分享到
快速回复
限60 字节
 
上一个 下一个