outlook - Reading mail data from powershell -


i'm trying read data .pst file using powershell , can't seem extract attributes mail items, specifically:

recipients, sender, cc, bcc, body

for reason when try access these properties code shows blank. of other properties show file (subject, attachments etc...)

i'm using following code:

$objoutlook = new-object -comobject outlook.application  $ns = $objoutlook.getnamespace("mapi")  $ns.addstore($pst.fullname)  $folders = $ns.folders  $archivestore = $ns.folders[$pst.name.replace(".pst","")] 

from there use folders , items recursively mail items.

any ideas?

this returns sender me.

$archivestore.items | %{$_.sendername} 

which property using fetch recipients,sender,cc,bcc,body?


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -