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
Post a Comment