{"id":12971,"date":"2011-08-18T00:01:00","date_gmt":"2011-08-18T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2011\/08\/18\/use-powershell-to-parse-email-message-headerspart-1\/"},"modified":"2011-08-18T00:01:00","modified_gmt":"2011-08-18T00:01:00","slug":"use-powershell-to-parse-email-message-headerspart-1","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/use-powershell-to-parse-email-message-headerspart-1\/","title":{"rendered":"Use PowerShell to Parse Email Message Headers&#8212;Part 1"},"content":{"rendered":"<p><b>Summary<\/b>: Guest Blogger Thiyagu teaches how to use Windows PowerShell to parse and analyze email message headers.<\/p>\n<p>&nbsp;<\/p>\n<p>Microsoft Scripting Guy Ed Wilson here. Thiyagarajan Parthiban is our guest blogger today with an interesting article about using Windows PowerShell to analyze Exchange email. First, though, let&rsquo;s learn something about Thiyagu.<\/p>\n<p style=\"padding-left: 30px\">I am the founder of the <a href=\"http:\/\/www.powershellgroup.org\/Singapore\">Singapore PowerShell User Group<\/a>. I am an Exchange administrator, and I have been scripting for more than seven years now. Before Windows PowerShell, I did most of my scripting in VBScript. With Windows PowerShell, I automate Exchange\/Active Directory tasks, and I am also good at WMI, ADSI, and generating custom reports. I have developed custom applications in C# for automation. I love to automate things!<\/p>\n<p style=\"padding-left: 30px\">You will find me on <a href=\"http:\/\/www.myexchangeworld.com\/\">my blog<\/a>.<\/p>\n<p>Take it away, Thiyagu!<\/p>\n<p>&nbsp;<\/p>\n<p>Last year, a survey was conducted to figure out the number of email messages sent every day across the globe. It was estimated that approximately 294 billion messages per day are sent, which is 2.8 million messages per second. By the way, 90 percent of all email is either spam or viruses.<\/p>\n<p>Each and every email message you send or receive has a piece of information in it called a <i>message header<\/i>. Every email message you receive in your inbox has this information. There are different ways to view this message header, depending on which email client you are using. For example, here are <a href=\"http:\/\/blogs.msexchange.org\/walther\/2009\/09\/07\/problems-finding-the-message-header-in-outlook-2010\/\">instructions for getting the message header<\/a> of an email address if you are using Outlook 2010. The following figure shows how a message header looks.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3782.HSG-8-18-11-1.jpg\"><img decoding=\"async\" style=\"border: 0px\" title=\"Image of a message header\" alt=\"Image of a message header\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3782.HSG-8-18-11-1.jpg\" \/><\/a><\/p>\n<p>This text information contains a lot of details about the message you have received. <a href=\"http:\/\/www.ietf.org\/rfc\/rfc2822.txt\">RFC 822<\/a> tells how to place information about an email message into this header.<\/p>\n<p>For now, focus on the green box in the preceding figure. This section has information about how this message got to your inbox. For an email to come to your inbox, it takes so many routes. That is our main focus in today&rsquo;s post: we want to get this data parsed out of this messy text and present it in a nice little table so that you can understand what really happened with that email message.<\/p>\n<p>Whenever you try to make sense of an email message header, read it from the bottom up. The above piece of code has only four lines and is cut into different lines. Here is how it looks after removing the unwanted lines:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8623.HSG-8-18-11-2.jpg\"><img decoding=\"async\" style=\"border: 0px\" title=\"Image of message header with unwanted lines\" alt=\"Image of message header with unwanted lines\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8623.HSG-8-18-11-2.jpg\" \/><\/a><\/p>\n<p>You see, it looks already a lot cleaner, after you remove those extra lines. Take a look at the boxes and circles in the image above, and read it like this:<\/p>\n<p>Received the email from Server &ldquo;Corp.red.com ([16.25.5.17])&rdquo; by Server &ldquo;Singapore.red.com ([15.60.22.16])&rdquo; with protocol &ldquo;mapi id 14.01.0323.002&rdquo; and at time &ldquo;Wed, 13 Jul 2011 18:50:16 +0800&rdquo; , which is UTC +8 (which is Singapore), you can tell from the server which received the message it says &ldquo;Singapore.red.com&rdquo;<\/p>\n<p>If that did not make much sense, it might help to visualize it like in the following figure.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7382.HSG-8-18-11-3.jpg\"><img decoding=\"async\" style=\"border: 0px\" title=\"Image of a hop from one server to another\" alt=\"Image of a hop from one server to another\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7382.HSG-8-18-11-3.jpg\" width=\"411\" height=\"196\" \/><\/a><\/p>\n<p>Now, this server will send the message again to another server and so on. Each trip from server to server is called a <i>hop<\/i>. The hop chain continues until it finally reaches your inbox. At times, there might be a delay when going through one of these chains. Maybe a server was busy or there was too much load, which could cause delays to email being delivered to your inbox. In this example, we have four lines, so we have four hops for the email to reach your mailbox.<\/p>\n<p>Enough of theory. Let&rsquo;s talk about Windows PowerShell, starting with another figure.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8741.HSG-8-18-11-4.jpg\"><img decoding=\"async\" style=\"border: 0px\" title=\"Image of patterns in message header\" alt=\"Image of patterns in message header\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8741.HSG-8-18-11-4.jpg\" \/><\/a><\/p>\n<p>We have to extract the piece of information between the above-mentioned sections to form our objects. You can see from the preceding screenshot that it has a pattern. Luckily, this is where regular expressions come to the rescue. Read this great article by PowerShell MVP Tome about <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/03\/04\/use-powershell-regular-expressions-to-parse-an-rss-feed.aspx\">regular expressions and Windows PowerShell<\/a>.<\/p>\n<p>We need to get four pieces of information from each line:<\/p>\n<ol>\n<li>All text after <i>Received: from<\/i> until there is a word called <i>by<\/i>. This will be our Received From Server information.<\/li>\n<li>All text after <i>by<\/i> until there is a word called <i>with.<\/i> This info will be the server who receives the email from the server above.<\/li>\n<li>All text after <i>with<\/i>, until there is a character <i>;<\/i> (a semicolon) and this is the protocol.<\/li>\n<li>All text after <i>;<\/i> (a semicolon) and get the next minimum 32 to 36 space\/nonspace data.<\/li>\n<ol>\n<li>This data is the date. Here is a sample date:<\/li>\n<ol>\n<li>&nbsp;Wed, 20 Jul 2011 22:28:16 -0700. This is the maximum possible for standard time, so we can get other data as well. Sometimes, there might be space or there is new line, so I am giving myself a buffer, so later we can remove unwanted data from this string.<\/li>\n<\/ol>\n<\/ol>\n<\/ol>\n<p>&nbsp;Here is the regular expression pattern I came up with:<\/p>\n<p style=\"padding-left: 30px\">$regexFrom1 = &#8216;Received: from([\\s\\S]*?)by([\\s\\S]*?)with([\\s\\S]*?);([(\\s\\S)*]{32,36})(?:\\s\\S*?)&#8217;<\/p>\n<p>Can you believe, that the above regular expression pattern can do all four of the things I said above? If you are good at Windows PowerShell and still haven&rsquo;t used regular expressions, you are missing an important weapon in your Windows PowerShell arsenal.<\/p>\n<p style=\"padding-left: 30px\"><b>Note&nbsp; <\/b>&nbsp;Check out this <a href=\"http:\/\/richardspowershellblog.wordpress.com\/2011\/03\/23\/regular-expression-recording\/\">webcast<\/a> by Tome. It is a great introduction to regular expressions.<\/p>\n<p>Because we do not know how the text is going to be in the message header, it is good to read the whole data as one long string and work with it. Here is the technique to do read a file into one big string.<\/p>\n<p style=\"padding-left: 30px\">$text = [System.IO.File]::OpenText(&#8220;C:\\Scripts\\msg6.txt&#8221;).ReadToEnd()<\/p>\n<p>His file now has the same information as the first screenshot in this post. I wanted to write a function that would take this <b>$text<\/b> as input, process the string, give out all the parsed data, package it in an array of <b>PSObjects<\/b>, and return them. I used <b>Select-String<\/b> along with the regular expression pattern and iterated through all the matches I got.<\/p>\n<p>Here is how I did that:<\/p>\n<p style=\"padding-left: 30px\">Function Process-ReceivedFrom<\/p>\n<p style=\"padding-left: 30px\">{<\/p>\n<p style=\"padding-left: 30px\">Param($text)<\/p>\n<p style=\"padding-left: 30px\">$regexFrom1 = &#8216;Received: from([\\s\\S]*?)by([\\s\\S]*?)with([\\s\\S]*?);([(\\s\\S)*]{32,36})(?:\\s\\S*?)&#8217;<\/p>\n<p style=\"padding-left: 30px\">$fromMatches = $text | Select-String -Pattern $regexFrom1 -AllMatches<\/p>\n<p style=\"padding-left: 30px\">if ($fromMatches)<\/p>\n<p style=\"padding-left: 30px\">{<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rfArray = @()<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fromMatches.Matches | foreach{<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $from = Clean-string $_.groups[1].value<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $by = Clean-string $_.groups[2].value<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $with = Clean-string $_.groups[3].value<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Switch -wildcard ($with)<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&#8220;SMTP*&#8221; {$with = &#8220;SMTP&#8221;}<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&#8220;ESMTP*&#8221; {$with = &#8220;ESMTP&#8221;}<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;default{}<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $time = Clean-string $_.groups[4].value<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fromhash = @{<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReceivedFromFrom = $from<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReceivedFromBy = $by<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReceivedFromWith = $with<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReceivedFromTime = [Datetime]$time<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fromArray = New-Object -TypeName PSObject -Property $fromhash&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rfArray += $fromArray&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rfArray<\/p>\n<p style=\"padding-left: 30px\">}<\/p>\n<p style=\"padding-left: 30px\">else<\/p>\n<p style=\"padding-left: 30px\">{<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $null<\/p>\n<p style=\"padding-left: 30px\">}<\/p>\n<p style=\"padding-left: 30px\">}<\/p>\n<p>To explain the regular expression a little bit:<\/p>\n<p style=\"padding-left: 30px\">&#8216;Received: from([\\s\\S]*?)by([\\s\\S]*?)with([\\s\\S]*?);([(\\s\\S)*]{32,36})(?:\\s\\S*?)&#8217;<\/p>\n<p>&nbsp;<\/p>\n<p>Each of those is matched into groups and then you can access them using the <b>matches<\/b> property. This is true except for the last one (in the world of regular expressions, &ldquo;?:&rdquo; means don&rsquo;t group them). This is the class it will get stored in: <b>Microsoft.PowerShell.Commands.MatchInfo<\/b>.<i>&nbsp;<\/i><\/p>\n<p>I just loop through the matches and then build a <b>PSObject<\/b> for each of the matches. Now, if I output the results of the function to a gridview, I see what is shown in the following figure:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1586.HSG-8-18-11-5.jpg\"><img decoding=\"async\" style=\"border: 0px\" title=\"Image of results of function in gridview\" alt=\"Image of results of function in gridview\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1586.HSG-8-18-11-5.jpg\" \/><\/a>&nbsp;<\/p>\n<p>Read the next part tomorrow, where I show how I put the pieces together to get delay information from different hops and then finally to build a GUI tool for this functionality.<\/p>\n<p>&nbsp;<\/p>\n<p>Thiyagu, this is an excellent article. Thank you for sharing your time with us and for sharing your expertise with the Windows PowerShell community. I am really looking forward to part 2 tomorrow!<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><b>Ed Wilson, Microsoft Scripting Guy<\/b><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Guest Blogger Thiyagu teaches how to use Windows PowerShell to parse and analyze email message headers. &nbsp; Microsoft Scripting Guy Ed Wilson here. Thiyagarajan Parthiban is our guest blogger today with an interesting article about using Windows PowerShell to analyze Exchange email. First, though, let&rsquo;s learn something about Thiyagu. I am the founder of [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[56,28,180,3,225,45],"class_list":["post-12971","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-guest-blogger","tag-messaging-and-communication","tag-microsoft-exchange-2010","tag-scripting-guy","tag-thiyagu","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Guest Blogger Thiyagu teaches how to use Windows PowerShell to parse and analyze email message headers. &nbsp; Microsoft Scripting Guy Ed Wilson here. Thiyagarajan Parthiban is our guest blogger today with an interesting article about using Windows PowerShell to analyze Exchange email. First, though, let&rsquo;s learn something about Thiyagu. I am the founder of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/12971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=12971"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/12971\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=12971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=12971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=12971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}