none
read email via powershell from another user mailbox RRS feed

  • Question

  • Hello how can I read the first email from an Azure Office365 mailbox that has MAP enabled

    I can do the following and I get to the Inbox. But I am stuck . 

    $Credential = Get-Credential 'Server.monitor@XXXXX.onmicrosoft.com'
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Credential -Authentication Basic -AllowRedirection
    $Session | FL
    #Invoke-Command -Session $Session -ScriptBlock {Get-Mailbox}

    Invoke-Command -Session $Session -ScriptBlock {Get-MailboxFolder -Identity Server.monitor:\Inbox} 

    Thursday, July 11, 2019 5:11 AM