SAM2009
asked on
Is there a PowerShell cmd that can read Outlook email header? ?
Hi,
Is there a PowerShell cmd that can read Outlook email header?
I need to access header properties and find send IP.
Is there a PowerShell cmd that can read Outlook email header?
I need to access header properties and find send IP.
Are you trying to access emails that reside in Outlook desktop, or O365 in the cloud?
»bp
»bp
Do you mean something like this: https://mha.azurewebsites.net/
but automated with Powershell script to go through your Desktop Outlook?
but automated with Powershell script to go through your Desktop Outlook?
ASKER
Yes get info like this: https://mha.azurewebsites.net/
But this need to paste Email Header properties to the link. Is there a way by PowerShell? ... I doubt.
But this need to paste Email Header properties to the link. Is there a way by PowerShell? ... I doubt.
Hi Sam,
What about adding this Add-Ons: https://appsource.microsoft.com/en-us/product/office/WA104005406
For more of the steps, you can follow it here: https://www.howtogeek.com/442317/how-to-read-message-headers-in-outlook/
What about adding this Add-Ons: https://appsource.microsoft.com/en-us/product/office/WA104005406
For more of the steps, you can follow it here: https://www.howtogeek.com/442317/how-to-read-message-headers-in-outlook/
ASKER
The fist one is similar to the link before but it's an Add-ON
The second it just the manual way to see the header.
None of them show us how to use PowerShell to automatize the process.
The second it just the manual way to see the header.
None of them show us how to use PowerShell to automatize the process.
Are you trying to access emails that reside in Outlook desktop, or O365 in the cloud?
»bp
ASKER
Outlook desktop
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
Probably, but it would take me too much time to figure it out. You can try it yourself by first reading up and trying to understand this:
https://devblogs.microsoft.com/scripting/learn-to-use-the-exchange-web-services-with-powershell/
When you get the hang of it, use this code to give you hints how to apply it to Powershell:
https://social.technet.microsoft.com/Forums/office/en-US/1e5bbde0-218e-466e-afcc-cb60bc2ba692/e2010-ews-c-how-to-get-the-actual-smtp-address-that-an-email-was-sent-to-internally?forum=exchangesvrdevelopment
It extracts the To: field, but in your case, you can simplify it and dump the whole header.
To get the real originating IP address is still very tricky though (if there are more MTA hops). If you are only interested in the last hop connecting to your Exchange server, maybe its doable.