If you wanted to add more of the message properties to the CSV export use the list provided in the linked article and add them to $result = line. FindItems ( 10 ) $mailitems | ForEach $result | Export-CSV 'C:\temp\msgs\messagelist.csv' -ntiPlease note that whatever machine you run this from must have Outlook installed on it to use the Outlook COM object within the PS script.Īlso credit to the original article you linked for the bulk of the above code and for pointing me in the right direction. FolderId ( :: Inbox, $MailboxName ) $Inbox = :: Bind ( $service, $folderid ) $mailitems = $inbox. Url = "" $folderid = new-object Microsoft. Credentials = :: new (, "superSecretPassword" ) $Service. $mailboxname = Import-Module 'C:\Program Files\Microsoft\Exchange\Web Services\2.2\' $Service = :: new () $Service. Powershell #Mailboxname could be an array where you loop through.this is just an example of how to open another user's mailbox taht differs from the $service.Credentials user. I hope I do not have to resort to copy and paste !! I can open the msg file, read the properties and see the message ID, so I do not understand why this method will not list it. filed into DMS) date.Īnton: This gives lots of information, and I even found a way of scanning a folder containing the extracted msg files ( here), and it will read individual folders, but.every single piece of information I could want, except for the message ID, unless you know of a way of finding that out. Also, it doesn't seem to be able to read folder contents - I need the deleted items folder, with emails lastmodified (i.e. Mike: This method got me the message id, but it lists by created date, we need last modified date, and I don't think Get-MessageTrackingLog can give me that. I need the message ID and the subject to compare with a list from our DMS, of missing emails (we had a data loss and need to put 1600 emails back in) Thanks for your help, I really appreciated the time you spent on it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |