neil_doody-gl
11 years agoLevel 3
EWS API with Powershell
I've installed the EWS API and I want to use it with Powershell...I've taken a sample code that works in VBScript for simple downloading an email from teh store and saving as a .MSG file. This works...
- 11 years ago
This is a PS limitation
Item.Content is effectively the same COM object as Item (just a QueryInterface) and .NET/PowerShell only “sees” the default interface which is IItem.
PS> $EVITEM | gm
PS> $EVITEMCONTENT = $EVITEM.Content
PS> $EVITEMCONTENT | gm
Show that you have the same PS/.NET object for $EVITEM and $EVITEMCONTENT.
So unless/until PowerShell provides easy usage/support for Com’s QueryInterface …its not going to work.