Skip to Main Content
Microsoft Exchange 2010 PowerShell Cookbook
book

Microsoft Exchange 2010 PowerShell Cookbook

by Mike Pfeiffer
July 2011
Intermediate to advanced content levelIntermediate to advanced
480 pages
11h 54m
English
Packt Publishing
Content preview from Microsoft Exchange 2010 PowerShell Cookbook

Retrieving the headers of an e-mail message

When troubleshooting mail flow issues, you may need to take a look at the headers of an e-mail message. This is easy to do through Outlook for items in your own mailbox, but if you want to do this on behalf of another user, it requires you to have permissions to their mailbox, and then you need to open their mailbox in Outlook to view the headers. In this recipe, we'll take a look at how you can retrieve the headers of a message in your own mailbox, as well as another user's mailbox, using the EWS Managed API and PowerShell.

How to do it...

  1. First, load the assembly, create the ExchangeService object, and connect to EWS:
    Add-Type -Path C:\EWS\Microsoft.Exchange.WebServices.dll $svc = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition - Second Edition

Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition - Second Edition

Jonas Andersson, Mike Pfeiffer

Publisher Resources

ISBN: 9781849682466Other