0
votes

I am trying to find a way to be able to read an inbox of an account in timed interval with powershell, but am coming across an issue. I have been looking into solutions such as the following http://support.microsoft.com/kb/310244/en-us, but i need to be able to read in the account just using username and password in the command string or script, not using Credentials Profile. How can I do this? I do not want a spoon feeding, but any references or pointers wold be greatly appreciated.

BTW, the only question I a, asking here is how can I read an accounts inbox from exchange, being able to set an account in the script, and run it from within the network anywhere, instead of having to reside on that machine.

P.S. Need this for Exchange 2003 and or just basic smtp server.

1

1 Answers

1
votes

For this kind of work, you'd be much better off using the EWS Managed API (assuming we're talking about Exchange 2007 or later).

http://www.microsoft.com/en-us/download/details.aspx?id=35371

With this you can script reading email from an Exchange mailbox without requiring Outlook to be installed or needing a MAPI profile configured for the mailbox.

Glen Scales has some excellent examples on his blog:

http://gsexdev.blogspot.com/

That should get you started. The appropriate code for implementation will depend on what the criteria is for the items you want to read from the Inbox, and how frequent your read intervals are going to be.