locked
List number of messages by message class Exchange 2007 RRS feed

  • Question

  • Does anyone have a method of getting a count of items per message class for a malibox on Exch 2007?
    Tuesday, September 25, 2012 2:13 PM

Answers

  • Hello,

    If you need to do from server side, you need use EWS to write the script.

    Here is one related document for you:

    Exchange 2010 : Search and Delete Items by MessageClass [ EWS method ]

    http://blogs.technet.com/b/manjubn/archive/2012/03/31/exchange-2010-search-and-delete-items-by-messageclass-ews-method.aspx

    If you have any question on writing the script, you can ask in Exchange development forum:

    Exchange Development

    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads

    Thanks,

    Evan Liu

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tnmff@microsoft.com


    Evan Liu

    TechNet Community Support

    Wednesday, September 26, 2012 8:29 AM
    Moderator

All replies

  • Well, if no-one has a better method (something clever in powershell, perhaps), you might try putting this in a vbs file, and running it on a user's computer.  You would need to assume, though, that all items in a folder have the same class as the folder.  If not, then it's something to build on.


    Option Explicit

    Dim f, fldr, fso, olkApp, olkNS, store

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.CreateTextFile("FolderList.txt", True, True)
    Set olkApp = CreateObject("Outlook.Application")
    Set olkNS = olkApp.GetNameSpace("MAPI")
    Set store = olkNS.DefaultStore
    For Each fldr In store.GetRootFolder.Folders
      doFolder fldr
    Next

    Sub doFolder(fldr)
      Dim subFldr
      f.WriteLine fldr.Name & " (" & fldr.DefaultMessageClass & ") " & fldr.Items.Count
      For Each subFldr In fldr.folders
        doFolder subFldr
      Next
    End Sub


    Mobile OWA For Smartphone
    www.leederbyshire.com
    email a@t leederbyshire d.0.t c.0.m


    Tuesday, September 25, 2012 3:18 PM
  • Hello,

    If you need to do from server side, you need use EWS to write the script.

    Here is one related document for you:

    Exchange 2010 : Search and Delete Items by MessageClass [ EWS method ]

    http://blogs.technet.com/b/manjubn/archive/2012/03/31/exchange-2010-search-and-delete-items-by-messageclass-ews-method.aspx

    If you have any question on writing the script, you can ask in Exchange development forum:

    Exchange Development

    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads

    Thanks,

    Evan Liu

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tnmff@microsoft.com


    Evan Liu

    TechNet Community Support

    Wednesday, September 26, 2012 8:29 AM
    Moderator
  • Hi,

    How about the issue, any updates?

    Thanks,

    Evan Liu

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tnmff@microsoft.com


    Evan Liu

    TechNet Community Support

    Tuesday, October 2, 2012 1:23 AM
    Moderator