locked
How to read message Tracking log entries from Exchange Server 2010 using Dotnet RRS feed

  • Question

  • How to read all the message tracking log entries data from Exchange server 2010 using  Dotnet Powershell program(Remote method)

    My dot net installed machine and Exchange server 2010 machines are different domains.

    Pls help me..

    (send me Url also)

    By

    Path Finder....

    Wednesday, December 29, 2010 7:32 AM

Answers

  • using EWS NO not with those operations you should be using the EMS Get-MessageTrackingLog cmdlet if you want to read the total bytes

    Cheers
    Glen

    Wednesday, January 5, 2011 2:19 AM
  • Mr Glen.

       Thanks, thank you very much. I have learned  lot of things from your responce. finaly I have finished my task.

    In Exchange server 2003  I have developed the message tracking task using WMI via vb dotnet. I have used the WQL query for the message filtering pupose. for example 

    "Select * from Exchange_MessageTrackingEntry where Senderaddress='xxxxx@yyy.com' And Subject='xxxxxx'"

     

     

    I got all the entries from message log file Except the recipient filter option. But in same query wont work when I pass the Recipient address filter otions like 

    "Select * from Exchange_MessageTrackingEntry where RecipientAddress='xxxxx@yyy.com'"

    So first I have retrived  the given filter  details ,after that I have again filtered the first time fitering result  if the filter option have the recipient filter option. i know it is not a good way..

    How can I perform the Recipient address filter otions from message tracking using WMI(Exchange server 2003) ?

    Please help me replay me..

    By
    Path Finder..

    Wednesday, January 5, 2011 5:19 AM

All replies

  • If you want to read all the message tracking logs entries for all users on a particular Exchange 2010 then you should use the Exchange management Shell Get-MessageTrackingLog http://technet.microsoft.com/en-us/library/aa997573.aspx  cmdlet.  There are message tracking operations in EWS but these are designed more from a user standpoint to track their own messaging activity while the EMS cmdlets are designed for administrators and management agents etc.

    Cheers
    Glen

     

    Thursday, December 30, 2010 2:25 AM
  • Thanks Glen.

    I have used Exchange management Shell and it working very well.

    I want to create a vb.net porgram which is used to run the Exchnage server management shell commands.
    In otherwords I want to run the powershell(Get-MessageTrackingLog) scripts via dotnet.

    Please reply me..

    By

    Path finder...

    Thursday, December 30, 2010 5:46 AM
  • Thanks Geln

     It is very useful one for me. I have created the program using vb.net 2005 Express Edition and I have used the administrator (Exchange) Credentials in my code. I got the below error When I Execute my sample, in this line. 

     Dim runspace As Runspace = RunspaceFactory.CreateRunspace(connectionInfo)

    The error is,
    ------------------------------------------------------------------------------------
    TypeInitializationException was unhandled

      The type initializer for
      'System.Management.Automation.Remoting.Client.WSManClientSessionTransportManager'
      threw an exception.
    ------------------------------------------------------------------------------------

    Please reply me

    By

    Path finder....

    Thursday, December 30, 2010 12:39 PM
  • You need to look at the Inner Exception to see what the error actually is you might also want to try the vb sample in http://blogs.msdn.com/b/zainnab/archive/2008/07/26/calling-a-powershell-script-from-your-net-code.aspx

    Cheers
    Glen

    Friday, December 31, 2010 2:26 AM
  • Thanks Glen..

     I have downloaded the Windows powershell 2.0 from msdn download and i have added that DLL, when I start to develop this sample.

     I have referred your last replay URL informations. My sample also followed the same  aproches.. But the main difference is dotnet frame work.
    I have used dotnet frame work 2.0 ( dotnet 2005 and WinXP-sp2).  but your refference URL, they used the dotnet frame work 3.5.

    I have run my same sample using my friend machine and that machine  running   Windows seven os and  Dotnet frame work 4.0
    (ie. VS 2010). that time I didnot get any error..

    I have found "Windows PowerShell 2.0 requires the Microsoft .NET Framework 2.0 with Service Pack 1." from  http://support.microsoft.com/kb/968929  this URL.

    if you want I have send My sample too for your consider.

    Pls replay me..
     
    By

    Path finder

    Friday, December 31, 2010 10:27 AM
  • You need to make sure you have all the prerequisites installed http://technet.microsoft.com/en-us/library/dd335147.aspx (windows xp SP3). Your also going to find life a lot easier is you do upgrade the framework and version of Visual studio your using.

    Cheers
    Glen

    Monday, January 3, 2011 8:49 AM
  • Thanks Glen.

    Its very usefull information for me. Now iam going to upgrade my  machine configurtions.

     Mr Glen I have developed a task which is performed  Message tracking from Exchnage server 2010 using dotnet 2005 via webservice.  I have used  FindMessageTrackingReport(), GetMessageTrackingReport() methods. But I could not read  all the properties from Exchnage log entries. Because There is not avilable  all options

    In Exchange server 2010 every log file contains the following entries.

    1) date-time, 2) client-ip, 3)client-hostname,4) server-ip, 5) server-hostname, 6) source-context,7) connector-id,8) source, 9) event-id, 10) internal-message-id,  11) message-id,  12) recipient-address, 13) recipient-status,14) total-bytes,
    15) recipient-count, 16) related-recipint-address, 17) reference,  18) message-subject,  19) sender-address, 20) return-path, 21) message-info, 22) directionality, 23) tenant-id, 24) original-client-ip, 25) original-server-ip

    But in webservice, GetMessageTrackingReport(), FindMessageTrackingReport() methods gives the following results only

    Message subject, Sender ID, RecipientID, recipientcount, InternalId, DeliverStatus, Date, BccRecipient, EventDescription, HiddenRecipient, BccRecipientSpecified, UniquePathId and Server.

    How can I read remaining entries from message log file. I want to read the Total-bytes entry. Which method can I use to read the Total-bytes value from Message log.(via webservice)

    I have checked  and followed this [MS-OXWSMTRK]  book in  my sample.  I have download [MS-OXWSMTRK] this book from  http://msdn.microsoft.com/en-us/library/ee219296(v=EXCHG.80).aspx

    Please help me,replay me.
    By
    Path Finder

    Monday, January 3, 2011 9:48 AM
  • The EWS operations are more designed for users to be able to track their own messages therefore they only return a subset of information more aimed at telling you the delivery status of a particular message. If you have a read through the [MS-OXWSMTRK] and look at the documentation for the response you should see that total bytes isn't returned by these operations.

    Cheers
    Glen

    Tuesday, January 4, 2011 2:25 AM
  • Thanks Glen,

      is there any possible to read the total bytes value using some other way?

    Because of I want to read the total bytes value regarding my trask.

    By

    Path Finder..

     

     

    Tuesday, January 4, 2011 10:06 AM
  • using EWS NO not with those operations you should be using the EMS Get-MessageTrackingLog cmdlet if you want to read the total bytes

    Cheers
    Glen

    Wednesday, January 5, 2011 2:19 AM
  • Mr Glen.

       Thanks, thank you very much. I have learned  lot of things from your responce. finaly I have finished my task.

    In Exchange server 2003  I have developed the message tracking task using WMI via vb dotnet. I have used the WQL query for the message filtering pupose. for example 

    "Select * from Exchange_MessageTrackingEntry where Senderaddress='xxxxx@yyy.com' And Subject='xxxxxx'"

     

     

    I got all the entries from message log file Except the recipient filter option. But in same query wont work when I pass the Recipient address filter otions like 

    "Select * from Exchange_MessageTrackingEntry where RecipientAddress='xxxxx@yyy.com'"

    So first I have retrived  the given filter  details ,after that I have again filtered the first time fitering result  if the filter option have the recipient filter option. i know it is not a good way..

    How can I perform the Recipient address filter otions from message tracking using WMI(Exchange server 2003) ?

    Please help me replay me..

    By
    Path Finder..

    Wednesday, January 5, 2011 5:19 AM