Mark Minasi's Tech Forum
Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
martinmcd

Avatar / Picture

Still looking for DenverCoder9
Registered:
Posts: 17
Reply with quote  #1 
I have an export from an Exchange 2010 mailbox that is about 1GB in size, and am wondering if there is a way to get message properties without actually opening the PST in Outlook. For example, is there a PowerShell command that I can run against the PST to find the date of the oldest message?
__________________
https://xkcd.com/979/
0
Mark

Hacked Mark's Facebook Account
Registered:
Posts: 273
Reply with quote  #2 
Well, there is kinda the Outlook COM object and some PowerShell.  Is that kosher?
__________________
May I ask that everyone please populate the first name and last name in your user account profile.  Thanks!
0
Wes

Senior Member
Registered:
Posts: 232
Reply with quote  #3 
Just curious what is the objection to loading and sorting/searching with Outlook?  Sensitive content or some other issue?
0
martinmcd

Avatar / Picture

Still looking for DenverCoder9
Registered:
Posts: 17
Reply with quote  #4 
It is a sensitive content issue.
Mark, using the Outlook COM object with PowerShell should be acceptable. 

__________________
https://xkcd.com/979/
0
cj_berlin

Avatar / Picture

Senior Member
Registered:
Posts: 297
Reply with quote  #5 

Well, the PST format is publicly documented by MSFT as are all Office file formats: https://msdn.microsoft.com/en-us/library/ff385210%28v=office.12%29.aspx , so in theory, you could read it directly. However, navigating through the nested B-Trees programmatically is a MAJOR PITA.

So yeah, Using Outlook via COM object model might get you there - but even scripting that, for a single file, is an overkill IMO because you would not only be scripting the Outlook Inspector (which is pretty straightforward) but also the MAPI profile editing (which isn't). If I were in this position, I would get a person of trust to open the PST in Outlook and export the message headers or whatever you are after from there interactively.

Another thought: If you have Exchange at your disposal, import the PST in a mailbox and export the message properties by utilizing EWS. You don't need to actually view the mailbox to do that.

FWIW,


__________________
Evgenij Smirnov

My personal blog (German): http://www.it-pro-berlin.de/
My stuff on PSGallery: https://www.powershellgallery.com/profiles/it-pro-berlin.de/
0
martinmcd

Avatar / Picture

Still looking for DenverCoder9
Registered:
Posts: 17
Reply with quote  #6 
Thank you. That does help clear things up for me. I just wanted to make sure there wasn't an obvious method that I was overlooking. 
__________________
https://xkcd.com/979/
0
Mark

Hacked Mark's Facebook Account
Registered:
Posts: 273
Reply with quote  #7 
Martin, I have a bunch of PowerShell Outlook code and in truth you can do some cool stuff but forgive me, it is a gnarly mess and I haven't time to clean it up now.

Eventually I will and I'm sorry that'll be too late for you.

__________________
May I ask that everyone please populate the first name and last name in your user account profile.  Thanks!
0
Xenophane

Avatar / Picture

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 20
Reply with quote  #8 
I did a major mail migration project a while back, where I had to get millions of mails out of an old IBM archiving product manually, and create PST files.. I ended up using http://www.aspose.com/.net/email-component.aspx from PowerShell to do it... Relatively easy to use and setup...

(Started off going down the outlook track, and it seemed to work.. Until I started doing some measurements, and figured out that sometimes mail would just be omitted from the PST's without any warning/error/notice)

__________________
Claus T Nielsen
Microsoft Cloud and Datacenter MVP 
Founder of the Danish PowerShell UserGroup http://psug.dk
 
<SIG> George Bernard Shaw : The power of accurate observation is commonly called cynicism by those who have not got it. </SIG>
0
Mark

Hacked Mark's Facebook Account
Registered:
Posts: 273
Reply with quote  #9 
Dang, Claus, when you talked about a PoSH thing for Outlook I got all excited, but now I see it's .NET.  I wish I were a black belt .NET PowerShell dude like you.  Ah well, perhaps one day.  

Seriously, did you just do a bit of .NET magic to enable you to do a New-Object and just go from there?  And it's less cumbersome than the COM stuff?

__________________
May I ask that everyone please populate the first name and last name in your user account profile.  Thanks!
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.