Reading the inbox - HOWTO?
I'm interested in connecting to my exchange server and retrieving the contents of a folder for processing. I've installed Exchange Management Shell (+ service pack) and have looked at the get-mailbox command which gives me information about the mailbox but no way to retrieve messages. I've read through the list of cmdlets in the shell but just don't see anything I can identify to solve my issue. in reading: http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/61c96d9b-85aa-474b-8497-301bdd2f4bec/ I've tried the command below but with a crash: # get-mailbox -identity "corp\caldee" |get-mailboxfolderstatistics -folderscope all WARNING: An unexpected error has occurred and a Watson dump is being generated: Method not found: '!0[] Microsoft.Exchange.Collections.HashSet`1.ToArray()'. WARNING: An unexpected error has occurred and a Watson dump is being generated: The pipeline has been stopped. Get-MailboxFolderStatistics : Method not found: '!0[] Microsoft.Exchange.Collec tions.HashSet`1.ToArray()'. At line:1 char:65 + get-mailbox -identity "corp\caldee" |get-mailboxfolderstatistics <<<< -folde rscope all + CategoryInfo : NotSpecified: (:) [Get-MailboxFolderStatistics], MissingMethodException + FullyQualifiedErrorId : System.MissingMethodException,Microsoft.Exchange.Management.Tasks.GetMailboxFolderStatistics can anyone point me to a way to retrieve e-mail? 1k takk - e
February 13th, 2010 6:08am

Indeed.http://gsexdev.blogspot.com/2009/04/using-ews-managed-api-with-powershell.html
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2010 9:01am

awesome. I downloaded the library (the link in the article was bad but here's the correct link: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c3342fb3-fbcc-4127-becf-872c746840e1) and can now read my inbox... however the .Body and .UniqueBody properties are empty for all messages. what's up with that? how can I actually read the mail then? there are no methods or other properties that yell out to me as to what I need to do...
February 17th, 2010 12:47am

Try doing a .load() on the item and then see if the body detail shows up.
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2010 1:06am

hooray! a million thanks
February 17th, 2010 1:27am

Cool :). Have fun with it!
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2010 2:11am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics