Skip to content
This repository was archived by the owner on Feb 2, 2019. It is now read-only.
This repository was archived by the owner on Feb 2, 2019. It is now read-only.

Move-Message Exception calling "MoveMessage" with "2" argument(s) #19

@cesugden

Description

@cesugden

I'm getting an error calling Move-Message:

Exception calling "MoveMessage" with "2" argument(s): "NO [TRYCREATE] No folder All Mail (Failure)"

Full Code:
$gmail = New-GmailSession -Credential $Creds
$inbox = $gmail | Get-Mailbox
$msgs = $inbox | Get-Message -Read -Prefetch
$msgs[0] | Move-Message "All Mail" -Session $gmail

The All Mail folder definitely exists. I've tried the below command and it fines the folder fine:
$allMail = $gmail | Get-Mailbox "All Mail"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions