Error Creating Redemption ComObject in PowerShell RRS feed

  • Question

  • Hi guys,

    I'm quite new to Powershell scripting but I thought I'd give it a go. 

    I want to write a simple script that can read certain field from an e-mail but I notices that using simple Outlook ComObjects will restrict access to certain fields I want to be able to read. The solution lead me to Redemption.

    I have written this basic code to test the redemption script.

    The Code :

    $routlook = New-Object -COM Redemption.RDOSession

    $junk = $routlook.GetDefaultFolder($OlFolderJunk)
    $MI = $box.items

    $MI|select  SenderName, SenderEmailAddress, To, Subject, Body

    The Error 

    Can anyone please help me and explain what this error represents? What's causing it? How can I fix it?

    Thank you so much! 

    Tuesday, February 23, 2016 9:45 AM