<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>PFEMessaging</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/messagingninjas/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/messagingninjas/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:30:12 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Auditing Admin Activities - reporting purposes</title>
      <link>https://docs.microsoft.com/archive/blogs/messagingninjas/auditing-admin-activities-reporting-purposes</link>
      <pubDate>Wed, 06 Jul 2016 14:04:20 GMT</pubDate>
      <dc:creator><![CDATA[Akshay Katti [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/messagingninjas/?p=125</guid>
      <description><![CDATA[In many organizations that I visit, they have multiple administrators. If in case something breaks...]]></description>
      <content:encoded><![CDATA[In many organizations that I visit, they have multiple administrators. If in case something breaks anytime, not a lot of administrators have any clear information on what was changed, what object was modified, who did the change and when was the change done.

This is not only applicable to customers who are on on-premises Exchange servers but also for the customers who are already on Exchange Online.

So, I thought of writing a script to get these information. Although it just uses our age old (yeah, since Exchange 2010 days) method of searching Admin audit logs, it gives it in a clear format for both admin to consume and understand the changes in the environment from Exchange admin console or Exchange management shell. So that if they review it, there is a clear information of what was changed from the Exchange environment perspective.

<strong>Use cases:</strong>

Exchange Admin takes permissions over another mailbox or adds user to permissions on another mailbox (can be sendas permission or full mailbox permission).

Exchange Admin makes a change with Exchange management shell/Exchange management Console/Exchange administration Center on a change in transport rule etc.

&nbsp;

<hr />

<span style="color: #339966;font-size: medium"> </span>

################################ Disclaimer ###################################

&lt;# This software (or sample code) is not supported under any Microsoft standard support program or service.
The software is provided AS IS without warranty of any kind.
Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose.
The entire risk arising out of the use or performance of the software and documentation remains with you.
In no event shall Microsoft, its authors, or anyone else involved in the
creation, production, or delivery of the software be liable for any damages whatsoever
(including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss)
arising out of the use of or inability to use the software or documentation, even if Microsoft has been advised of the possibility of such damages. #&gt;
# Version 1.0
############################## Start of the script #################################

$smtp = "<strong>HTServer1.contoso.com</strong>" # This should be a Hub transport server in the environment.
# $smtp has the server name which can be used as a server to connect from the script and submit the email. This can be either an Exchange server/IIS SMTP server/Any other third party servers.
$from = "AdminAuditLogReport@domain.com" #This is just an email address that it shows up in the sender field - can be any email address.
# $from has the name that needs to appear in the from field of the email.
$users = "AuditManager@contoso.com"; # this can be any email address you would like to have.
#$users = "Auditmanageruser1@contoso.com","Auditmanageruser2@contoso.com"; #You can add any other users also who would like to receive this alert email for Admin Audit logs
$AdminAuditCount = 0
$Begin = $null
$Begin = Get-Date
$Start = $Begin.AddDays(-1)
$end = $Begin
$Filename = $null
$Filename = ".\AdminAuditLogSearch_" + $Begin.Hour + $Begin.Minute + "_" + $Begin.Day + "-" + $Begin.Month + "-" + $Begin.Year + ".htm"

$report = $null
$report += "&lt;html&gt;"
$report += "&lt;head&gt;"
$report += "&lt;meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'&gt;"
$report += '&lt;title&gt;Admin Audit Log Search Report&lt;/title&gt;'
$report += '&lt;STYLE TYPE="text/css"&gt;'
$report += "&lt;!--"
$report += "td {"
$report += "font-family: Tahoma;"
$report += "font-size: 11px;"
$report += "border-top: 1px solid #999999;"
$report += "border-right: 1px solid #999999;"
$report += "border-bottom: 1px solid #999999;"
$report += "border-left: 1px solid #999999;"
$report += "padding-top: 0px;"
$report += "padding-right: 0px;"
$report += "padding-bottom: 0px;"
$report += "padding-left: 0px;"
$report += "}"
$report += "body {"
$report += "margin-left: 5px;"
$report += "margin-top: 5px;"
$report += "margin-right: 0px;"
$report += "margin-bottom: 10px;"
$report += ""
$report += "table {"
$report += "border: thin solid #000000;"
$report += "}"
$report += "--&gt;"
$report += "&lt;/style&gt;"
$report += "&lt;/head&gt;"
$report += "&lt;body&gt;"
$report += "&lt;table width='100%'&gt;"
$report += "&lt;tr bgcolor='#CCCCCC'&gt;"
$report += "&lt;td colspan='7' height='25' align='center'&gt;"
$report += "&lt;font face='tahoma' color='#003399' size='4'&gt;&lt;strong&gt;These were the Admin Audit logs on the Exchange Environment from $Start till $end &lt;/strong&gt;&lt;/font&gt;"
$report += "&lt;/td&gt;"
$report += "&lt;/tr&gt;"
$report += "&lt;/table&gt;"
$report += "&lt;table width='100%'&gt;"
$report += "&lt;tr bgcolor=#CCCCCC&gt;"
$report += "&lt;td width='10%' align='center'&gt;Admin Who Ran the command&lt;/td&gt;"
$report += "&lt;td width='10%' align='center'&gt;Commandlet Run&lt;/td&gt;"
$report += "&lt;td width='10%' align='center'&gt;Modified Object&lt;/td&gt;"
$report += "&lt;td width='10%' align='center'&gt;Succeeded&lt;/td&gt;"
$report += "&lt;td width='10%' align='center'&gt;Run Date&lt;/td&gt;"
$report += "&lt;td width='10%' align='center'&gt;Server on which the commandlet was run&lt;/td&gt;"
$report += "&lt;/tr&gt;"
$AdminAuditLog = Search-AdminAuditLog -StartDate $Start -EndDate $end | where{($_.cmdletname -notlike "New-Mailbox") -and ($_.cmdletname -notlike "enable-mailbox") -and ($_.cmdletname -notlike "Set-Mailbox") -and ($_.cmdletname -notlike "New-Mailcontact") -and ($_.cmdletname -notlike "Set-Mailcontact") -and ($_.CmdletName -notlike "Add-DistributionGroupMember") -and ($_.cmdletname -notlike "Remove-DistributionGroupMember") -and ($_.Cmdletname -notlike "Set-DistributionGroup") -and ($_.Cmdletname -notlike "New-DistributionGroup") -and ($_.Cmdletname -notlike "New-MoveRequest") -and ($_.CmdletName -notlike "New-MailboxExportRequest") -and ($_.CmdletName -notlike "New-MailboxImportRequest") -and ($_.CmdletName -notlike "Suspend-MoveRequest") -and ($_.CmdletName -notlike "Remove-MoveRequest") -and ($_.Cmdlet -notlike "Search-Mailbox")}
# The above line has a lot of conditions that should not go in the report. The reason being - Admin Audit logs keeps track of any command which modifies an object on the Exchange server (Set, enable, add, remove, move, new etc.)
# Having this all other information is too much junk every day. Only the major changes should be monitored.
if ($AdminAuditLog -ne $null)
{
foreach ($Entry in $AdminAuditLog)
{
Write-Host $Entry.caller `t $Entry.cmdletname `t $Entry.ObjectModified `t $entry.Succeeded `t $entry.RunDate `t $entry.OriginatingServer -ForegroundColor GREEN
$caller = $entry.caller
$cmdlet = $entry.cmdletName
$objmodified = $entry.objectmodified
$success = $entry.succeeded
$RunDate = $entry.RunDate
$servername = $entry.originatingServer
$report += "&lt;tr&gt;"
$report += "&lt;td&gt;$caller&lt;/td&gt;"
$report += "&lt;td bgcolor='Yellow' align=center&gt;$cmdlet&lt;/td&gt;"
$report += "&lt;td&gt;$objmodified&lt;/td&gt;"
$report += "&lt;td&gt;$success&lt;/td&gt;"
$report += "&lt;td&gt;$RunDate&lt;/td&gt;"
$report += "&lt;td&gt;$Servername&lt;/td&gt;"
$report += "&lt;/tr&gt;"
$AdminAuditCount += 1
}
}
else
{
Write-Output "No Commands were run which modified any objects in AD from $start till $end."
}

$report += "&lt;/table&gt;"
$report += "&lt;br&gt;"
$report += "Note: This will Not Include any changes done on the Edge servers/Any modifications done in AD directly logging into AD servers(eg: using ADSIEDIT/DSA/Any AD tools)"
$report += "&lt;/body&gt;"
$report += "&lt;/html&gt;"
Write-Output $AdminAuditCount
if ($AdminAuditCount -ge 1)
{
foreach ($user in $users)
{
Send-MailMessage -BodyAsHTML $report -SmtpServer $smtp -From "$from" -To "$user" -subject "Administrator Audit Logs" # send emails to all the users which you had specified in the $users
$report | out-file -encoding ASCII -filepath .\reports\AdminAuditLogs\$Filename
# The above line saves a copy of the report in the location. So, there needs to be folder structure created for this.
}
}

############################## End of the script #################################

<span style="color: #006400;font-family: Lucida Console;font-size: xx-small"> </span>

<hr style="height: 1px" />

<span style="color: #006400;font-family: Lucida Console;font-size: xx-small"> </span>

<span style="font-family: Calibri;font-size: medium">The above commandlet checks for admin activities in any environment - in terms of what changes were performed by the admin except the actions excluded above and sends an email to all the email addresses that is mentioned in the $users.
</span>

Admin audit logs are saved for a period of 90 days by default - customizable in on-premises Exchange server.

<span style="font-family: Calibri;font-size: medium"> Hope this helps a few of the admins out there who want to know what all changes were done in terms of Exchange environment in a specific duration.</span>]]></content:encoded>
    </item>
    <item>
      <title>Figuring out which client was used by the sender to send an email</title>
      <link>https://docs.microsoft.com/archive/blogs/messagingninjas/figuring-out-which-client-was-used-by-the-sender-to-send-an-email</link>
      <pubDate>Wed, 06 Jul 2016 13:21:14 GMT</pubDate>
      <dc:creator><![CDATA[Akshay Katti [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/messagingninjas/?p=126</guid>
      <description><![CDATA[I have had several customer requests in the past who wanted to figure out what client was used to...]]></description>
      <content:encoded><![CDATA[I have had several customer requests in the past who wanted to figure out what client was used to send an email from a specific mailbox in their Exchange environment (eg: want to figureout whether OWA/Outlook/ActiveSync/EWS etc. was used to send an email)

The simplest and the easiest way is to look through your Message Tracking logs.

In Exchange 2010, we introduced this field in the message tracking logs called as original client IP address.

This captures the machine IP that was used to send an email. This does not show up in your Get-MessagetrackingLogs commandlet by default on Exchange 2010.

So, you will have to manually get into the message tracking log file (based on the time the email was sent) from the mailbox server and look for the message ID for the email being sent. The message ID is something that could be found from both your Get-MessageTrackingLog as well as the message header from the recipients mailbox.

<a href="https://msdnshared.blob.core.windows.net/media/2016/07/MessageTrackingLog2.jpg"><img class="alignnone size-full wp-image-245" src="https://msdnshared.blob.core.windows.net/media/2016/07/MessageTrackingLog2.jpg" alt="MessageTrackingLog2" width="982" height="407" /></a>

&nbsp;

In the above screenshot of an email sent from one of the user using Outlook when you run the commandlet Get-MessageTrackingLog using EventType as Submit, we see that it did mention that the client used was MOMT (look at the SourceContext field).

ClientType:MOMT

Here are the various Client Types and their meaning.

<a href="https://msdnshared.blob.core.windows.net/media/2016/07/ClientTypeDefinition.jpg"><img class="alignnone size-full wp-image-155" src="https://msdnshared.blob.core.windows.net/media/2016/07/ClientTypeDefinition.jpg" alt="ClientTypeDefinition" width="602" height="150" /></a>

MOMT - expands to Messsaging On Middle Tier (means Outlook client).

If you are using OWA to send an email, you would notice ClientType as OWA

Now that we know what type of client is being used, how do we know what was the IP address from which the email was submitted?

Well, in Exchange 2010 there is no simple way like Get-MessageTrackingLog and you will have to depend on searching through Raw message tracking logs on the mailbox server on which the users mailbox database is mounted  to find out which Transport server the Email was submitted from the Mail submission part of the mailbox server.

If you are having more than one multi-role servers in the same AD site, the submission service will always try to submit the email to the transport service other than itself preferably. Only in case where it couldn't submit an email to other servers, it will try to submit to the transport service locally on the server.

So, go to the Exchange install directory (you can get that by looking at the inbuilt variable $exinstall from your Exchange management shell)

<a href="https://msdnshared.blob.core.windows.net/media/2016/07/ExplorerExInstall.jpg"><img class="alignnone size-full wp-image-166" src="https://msdnshared.blob.core.windows.net/media/2016/07/ExplorerExInstall.jpg" alt="ExplorerExInstall" width="787" height="472" /></a>

Under V14, go to TransportRoles\Logs\MessageTracking

You will notice a large number of Tracking log files under MessageTracking folder.

<a href="https://msdnshared.blob.core.windows.net/media/2016/07/RawTrackingFile.jpg"><img class="alignnone size-full wp-image-175" src="https://msdnshared.blob.core.windows.net/media/2016/07/RawTrackingFile.jpg" alt="RawTrackingFile" width="735" height="379" /></a>

But as you can notice, since the above screenshot is from my lab, you do not notice a large number of files here.

Look for the file name MSGTRKM********-*.log around the time that the message was sent.

Note - The file name is MSGTRK<em><strong>M </strong></em>and not MSGTRK.

MSGTRKM means a message tracking log generated by the submission part of email from the mailbox server and MSGTRK logs are the ones contain the further information about what happened to the email when the message is in transport pipeline.

You can copy the MSGTRKM log files to a machine which contains Excel and filter it out for the MessageID that you obtained from the above Get-MessagTrackingLog command.

You will notice the Hub Transport Server the message was given to under the Server-Host-Name Header. Once you obtain that, you open up the message tracking logs generated during the time of this email submission from that particular Transport server (obtained under Server-Host-Name header) and then filter that for MessageID again.

Also filter the obtained results for Event-id "<strong>Receive</strong>"

You must now notice only one line as mentioned in the screenshot below.

<a href="https://msdnshared.blob.core.windows.net/media/2016/07/EventIDAndMessageIDFiltered.jpg"><img class="alignnone size-full wp-image-195" src="https://msdnshared.blob.core.windows.net/media/2016/07/EventIDAndMessageIDFiltered.jpg" alt="EventIDAndMessageIDFiltered" width="1853" height="46" /></a>

Here, if you scroll right at look at the column "<strong>original-client-ip</strong>", you notice the IP address of the client machine from which the client submitted the email.

In Exchange 2013, this task is much simplified as we have introduced the OriginalClientIP address attribute in the Get-MessageTrackingLog commandlet.

<a href="https://msdnshared.blob.core.windows.net/media/2016/07/2013Tracking2.jpg"><img class="alignnone size-full wp-image-206" src="https://msdnshared.blob.core.windows.net/media/2016/07/2013Tracking2.jpg" alt="2013Tracking2" width="1196" height="167" /></a>

Now, if you are wondering why you aren't seeing the correct IP of the client machine, there could be several reasons behind that. Few of them are listed below:
<ol>
	<li>You have a Load balancer which masks the client IP address and stamps the connection coming to the server with its own floating IP address.</li>
	<li>You have client coming from internet and the client comes through a firewall/Proxy server which masks the IP address of the client machine.</li>
</ol>
If there is a user account which gets compromised and sends out large number of spam emails, you can now quickly figure out what type of client is being used to send emails out and take actions against such clients for that user.

For more information on the fields in Message Tracking Logs, please refer: https://technet.microsoft.com/en-us/library/bb124375(v=exchg.160).aspx]]></content:encoded>
    </item>
    <item>
      <title>Pulling out users who are connecting using Outlook 2003 in your Exchange 2010 environment</title>
      <link>https://docs.microsoft.com/archive/blogs/messagingninjas/pulling-out-users-who-are-connecting-using-outlook-2003-in-your-exchange-2010-environment</link>
      <pubDate>Tue, 12 May 2015 05:08:00 GMT</pubDate>
      <dc:creator><![CDATA[Akshay Katti [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/messagingninjas/2015/05/12/pulling-out-users-who-are-connecting-using-outlook-2003-in-your-exchange-2010-environment/</guid>
      <description><![CDATA[I have had many customers work their way out in pulling the information of what client is being used...]]></description>
      <content:encoded><![CDATA[<p>I have had many customers work their way out in pulling the information of what client is being used by various users in their Exchange 2010 environment. Especially Outlook 2003 clients. As if you have Outlook 2003 in your environment, you will not be able to go with Exchange upgrade to a new version.</p>
<p>Outlook 2003 is not supported with Exchange 2013 or even&nbsp;Office365.</p>
<p>One of the most easiest and fastest way of getting that information is by parsing the RPC Client Access logs using Log Parser Studio (LPS) tool written by Kary Wall. You can know more about what are the updates to this by adding yourself into RSS feeds on this <a href="/b/karywa/archive/tags/log+parser+studio/">https://blogs.technet.com/b/karywa/archive/tags/log+parser+studio/</a></p>
<p>You can find more information about usage of LPS could be found in the article&nbsp;mentioned&nbsp;<a href="/b/exchange/archive/2012/03/07/introducing-log-parser-studio.aspx">https://blogs.technet.com/b/exchange/archive/2012/03/07/introducing-log-parser-studio.aspx</a> and <a href="/b/exchange/archive/2013/06/17/log-parser-studio-2-2-is-now-available.aspx">https://blogs.technet.com/b/exchange/archive/2013/06/17/log-parser-studio-2-2-is-now-available.aspx</a></p>
<p>A pre-requisite for LPS to work is Log parser to be installed on the machine you are using LPS. You can download and&nbsp;install Log parser from&nbsp;<a href="https://www.microsoft.com/en-us/download/details.aspx">https://www.microsoft.com/en-us/download/details.aspx</a></p>
<p>LPS uses Log parser in the background. LPS is a GUI mode representation of what Log Parser can do in terms of parsing through Exchange related logs. To understand more, I would definitely recommend going through the&nbsp;<a href="/b/exchange/archive/2013/06/17/log-parser-studio-2-2-is-now-available.aspx">https://blogs.technet.com/b/exchange/archive/2013/06/17/log-parser-studio-2-2-is-now-available.aspx</a> mentioned earlier and download the LPS tool.</p>
<p>Now, that we have covered the way to download LPS, I will dig into going through RPC Client Access Logs.</p>
<p>The RPC Client Access Logs are saved by default in the directory mentioned inside the file <strong>Microsoft.Exchange.RPCClientAccess.Service.exe.config</strong> file located inside your <strong>Bin</strong> folder.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/Loggingpath.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/Loggingpath.jpg"><img width="553" height="245" style="width:767px;height:377px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/Loggingpath.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/Loggingpath.jpg" border="0" /></a></p>
<p>To pull the information about where we have our&nbsp;Exchange install directory on a specific server, you could open your Exchange management shell and Run $exinstall</p>
<p>The logging is by default enabled on Exchange 2010 servers. You could see the setting &quot;ProtocolLoggingEnabled&quot; set to &quot;true&quot; in the above config file image.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/ExchangeInstallDir.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/ExchangeInstallDir.png"><img width="419" height="49" style="width:489px;height:94px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/ExchangeInstallDir.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/ExchangeInstallDir.png" border="0" /></a></p>
<p></p>
<p>Now, if you open up the RPC client access logs that are generated inside the logging directory, you get to see various fields.</p>
<p>A few of the fields which will be of use to us in this specific activity are:</p>
<p></p>
<p><strong>1. client-name -</strong> User Distinguished name (UserDN)</p>
<p><strong>2. client-software </strong>- the software that is connecting to the server (eg: outlook.exe, communicator.exe etc)</p>
<p><strong>3.&nbsp;&nbsp;client-software-version - </strong>the version of software connecting to the server (eg: 11.*.*.*, 12.*.*.*, 14.*.*.*, 15.*.*.* etc.,&nbsp;)</p>
<p><strong>4. client-ip - </strong>IP address of the machine from which the software mentioned above is connecting to the server.</p>
<p></p>
<p>Now, there are a couple of ways of getting the information about users/machine IPs connecting to your environment.</p>
<p>One is a manual, old fashioned, time consuming and boring&nbsp;way of using Excel to get the fields you need.</p>
<p>Other is a quick (did I say quick? well, it flies), modern&nbsp;way of using LPS (let LPS do the job for you)&nbsp;- which we will be discussing&nbsp;in the post here.</p>
<p></p>
<p>I prefer to generally copy the log files to a location on my local machine before I go through any log files.</p>
<p>But, LPS also has this facility where you specify the share location and it can read through the logs on the share and still give you good results (will be a little slow as network latency will play its role here especially going across the WAN if you are specifying the logs on remote site servers)</p>
<p>Once you decide to either copy the log files locally or use file share to use a remote location share, we get into LPS tool.</p>
<p>When you open LPS, it shows up the main page.</p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/LPS.exe.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/LPS.exe.png"><img width="556" height="305" style="width:789px;height:385px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/LPS.exe.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/LPS.exe.png" border="0" /></a></p>
<p>&nbsp;</p>
<p>We will use a custom query to pull this information out from RPC Client Access Server.</p>
<p>Click on Create New Query option on Top of the page.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/Click-Create-New-Query.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/Click_2D00_Create_2D00_New_2D00_Query.png"><img width="551" height="97" style="width:784px;height:163px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/Click-Create-New-Query.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x248/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/Click_2D00_Create_2D00_New_2D00_Query.png" border="0" /></a></p>
<p></p>
<p>It opens up another tab as shown in the image below</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/ExplainLPSNewQuery.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/ExplainLPSNewQuery.png"><img width="553" height="306" style="width:802px;height:366px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/ExplainLPSNewQuery.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/ExplainLPSNewQuery.png" border="0" /></a></p>
<p></p>
<p>In the new query tab, select the <strong>Log Type:</strong> from &quot;NOTSET&quot; to <strong>&quot;</strong><strong>EELLOG&quot;</strong></p>
<p>and copy paste the Query mentioned below.</p>
<p></p>
<p style="background:white;"><strong><span style="color:#003366;font-family:&#39;Calibri&#39;,sans-serif;font-size:11pt;">SELECT DISTINCT TO_LOWERCASE(Client-Software) as Software, TO_LOWERCASE (Client-Software-Version) as Version, TO_LOWERCASE(Client-Name) as UserDN, Client-Ip</span></strong></p>
<p style="background:white;"><strong><span style="color:#003366;font-family:&#39;Calibri&#39;,sans-serif;font-size:11pt;">FROM &#39;[LOGFILEPATH]&#39;</span></strong></p>
<p style="background:white;"><strong><span style="color:#003366;font-family:&#39;Calibri&#39;,sans-serif;font-size:11pt;">WHERE Software IS NOT NULL</span></strong></p>
<p style="background:white;"><strong><span style="color:#003366;font-family:&#39;Calibri&#39;,sans-serif;font-size:11pt;">AND Client-IP IS NOT NULL</span></strong></p>
<p style="background:white;"><strong><span style="color:#003366;font-family:&#39;Calibri&#39;,sans-serif;font-size:11pt;">AND Version LIKE &#39;11.0%&#39;</span></strong></p>
<p style="background:white;"><strong><span style="color:#003366;font-family:&#39;Calibri&#39;,sans-serif;font-size:11pt;">AND Software LIKE &#39;outlook.exe%&#39;</span></strong></p>
<p style="background:white;"><strong><span style="color:#003366;font-family:&#39;Calibri&#39;,sans-serif;font-size:11pt;">ORDER BY Version Asc</span></strong></p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/ShowingTheQuery.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/ShowingTheQuery.png"><img width="553" height="320" style="width:802px;height:348px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/ShowingTheQuery.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/ShowingTheQuery.png" border="0" /></a></p>
<p></p>
<p>Explaining the query written above.</p>
<p>We are selecting 4 different columns. Client-Software&nbsp;as <strong>Software</strong>, Client-Software-Version as <strong>Version</strong>, Client-Name as <strong>UserDN </strong>and <strong>Client-IP</strong></p>
<p>Now, click on<strong> Log </strong>shown on top as shown in the image below.<strong><br /></strong></p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/SelectingLogFolder.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/SelectingLogFolder.png"><img width="552" height="65" style="width:845px;height:143px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/SelectingLogFolder.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/SelectingLogFolder.png" border="0" /></a></p>
<p></p>
<p>As soon as you click on the <strong>Log</strong>, it opens up a popup window as shown below.</p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/SelectFolderOrLogFileV1.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/SelectFolderOrLogFileV1.png"><img width="551" height="275" style="width:860px;height:358px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/SelectFolderOrLogFileV1.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/SelectFolderOrLogFileV1.png" border="0" /></a></p>
<p></p>
<p>Click on Add&nbsp;folder and&nbsp;browse a&nbsp;the server share to the location where RPC Client Access Logs are saved or&nbsp;select a local directory where you have the log files&nbsp;saved.</p>
<p></p>
<p>Selecting a server share:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/SelectingFolderUsingFileShare.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/SelectingFolderUsingFileShare.png"><img width="552" height="256" style="width:880px;height:291px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/SelectingFolderUsingFileShare.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/SelectingFolderUsingFileShare.png" border="0" /></a></p>
<p></p>
<p>Or selecting from a local directory:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/SelectingFolder.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/SelectingFolder.png"><img width="553" height="301" style="width:886px;height:312px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/SelectingFolder.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/SelectingFolder.png" border="0" /></a></p>
<p></p>
<p>Click Open</p>
<p>You could add multiple folders as well.</p>
<p>Once all the folders are selected, as shown below, you can click on <strong>OK</strong></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/FoldersShowingUp.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/FoldersShowingUp.png"><img width="552" height="273" style="width:893px;height:324px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/FoldersShowingUp.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/FoldersShowingUp.png" border="0" /></a></p>
<p></p>
<p>After this, you click on <strong>Execute</strong> on the top of the LPS page</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/ExecuteActiveQuery.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/ExecuteActiveQuery.png"><img width="552" height="63" style="width:895px;height:80px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/ExecuteActiveQuery.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/ExecuteActiveQuery.png" border="0" /></a></p>
<p></p>
<p>Now, sit back&nbsp;while LPS&nbsp;is doing its&nbsp;parsing. It should get you the information that you asked for in the Query mentioned above.</p>
<p>You could use this data to identify the&nbsp;Machine IP address and the users using those machines which has Outlook 2003 to&nbsp;access&nbsp;the mailbox on Exchange 2010.</p>
<p>The Versions are explained below</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><b><span style="font-family:Calibri;font-size:medium;">Client Version number</span></b></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><b><span style="font-family:Calibri;font-size:medium;">Friendly Name</span></b></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
<tr>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">11.0.5604.0</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">Outlook 2003</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
<tr>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">11.0.6352.0</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">Outlook 2003 SP1</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
<tr>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">11.0.6555.0</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">Outlook 2003 SP2</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
<tr>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">11.0.8000.0</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">Outlook 2003 SP2</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
<tr>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">11.0.8161.0</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">Outlook 2003 SP3</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
<tr>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">11.0.8200.0</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">Outlook 2003 SP3</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
<tr>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">11.0.8303.0</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
<td valign="top"><span style="font-family:Times New Roman;font-size:medium;"> </span>
<p><span style="font-family:Calibri;font-size:medium;">Outlook 2003 SP3</span></p>
<span style="font-family:Times New Roman;font-size:medium;"> </span></td>
</tr>
</tbody>
</table>
<p></p>
<p>If you notice any of the above versions in the output, it means that there are outlook 2003 clients connecting to the server and it needs to be upgraded ASAP.</p>
<p></p>
<p>- Akshay Katti</p>]]></content:encoded>
    </item>
    <item>
      <title>Get-MailboxFolderStatistics wrong output?</title>
      <link>https://docs.microsoft.com/archive/blogs/messagingninjas/get-mailboxfolderstatistics-wrong-output</link>
      <pubDate>Sun, 19 Oct 2014 21:47:03 GMT</pubDate>
      <dc:creator><![CDATA[Akshay Katti [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/messagingninjas/2014/10/19/get-mailboxfolderstatistics-wrong-output/</guid>
      <description><![CDATA[I was recently working on an environment where the item counts inside the folders were not showing...]]></description>
      <content:encoded><![CDATA[<p>I was recently working on an environment where the item counts inside the folders were not showing up the actual number as the count. It was always shows a couple of items more than what it was in the folder. Some time more than 10. Can be many... In my case its 484 (may be more on your mailbox as well...)</p>
<p>After banging my head over why it is showing extra count, we started looking at the TechNet for Get-MailboxFolderStatistics. TechNet clearly mentioned that the count will include hidden items as well.</p>
<p><em>A mailbox can have hidden items that are never visible to the user and are only used by applications. The <strong>Get-MailboxFolderStatistics</strong> cmdlet can return hidden items for the following values: FolderSize, FolderAndSubfolderSize, ItemsInFolder, and ItemsInFolderAndSubfolders.</em></p>
<p>So, got more curios about what was actually a hidden item. Digged in a little deeper using one of my favorite tool MFCMAPI.</p>
<p>Make sure the Outlook is in Online mode while you open up MFCMAPI.</p>
<p>Open MFCMAPI, click on Session &gt; Logon</p>
<p>Select the outlook profile if it prompts you for the Account to log into.</p>
<p>Expand &quot;Root Container&quot;</p>
<p>Expand &quot;Top of Information Store&quot;</p>
<p>Right click on the folder which you want to find out hidden messages about.</p>
<p>Click on &quot;Open Associated Contents table&quot;</p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/OpeningHidden.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/OpeningHidden.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/OpeningHidden.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/OpeningHidden.png" border="0" /></a></p>
<p></p>
<p>Once you click on it, it opens up another window which will contain all the hidden messages.</p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/HiddenItemsPreview.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/HiddenItemsPreview.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/HiddenItemsPreview.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/HiddenItemsPreview.png" border="0" /></a></p>
<p></p>
<p>It contains hidden messages such as Rules (mailbox rules), User Profile information, Retention Policies that user might have etc.</p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/HiddenItems.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/HiddenItems.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/50/HiddenItems.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-50/HiddenItems.png" border="0" /></a></p>
<p></p>
<p>The Message Class column of the window would give us a pretty close idea about what those messages are meant for.</p>
<p>Most of these would be information that the mailbox would need for its configuration. Users/Administrators do not have to worry about what each of these messages contain.</p>
<p>For more information, refer <a href="https://technet.microsoft.com/en-us/library/aa996762(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/aa996762(v=exchg.150).aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Our first blog</title>
      <link>https://docs.microsoft.com/archive/blogs/messagingninjas/our-first-blog</link>
      <pubDate>Sun, 05 Oct 2014 10:40:00 GMT</pubDate>
      <dc:creator><![CDATA[Akshay Katti [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/messagingninjas/2014/10/05/our-first-blog/</guid>
      <description><![CDATA[This is a test blog. Here is where we will add our new innovations/sharable findings/Any thing...]]></description>
      <content:encoded><![CDATA[<p>This is a test blog. Here is where we will add our new innovations/sharable findings/Any thing that&nbsp;is worth sharing from the Microsoft&nbsp;messaging end</p>
]]></content:encoded>
    </item>
  </channel>
</rss>