Larry G. Wapnitsky
Larry G. Wapnitsky

Reputation: 1256

O365 search-mailbox email type error

I've a need to delete meeting requests made by terminated users. I've been following the script at Deleting Meeting Requests made by terminated users, but I'm receiving the following error:

Please adjust the email type. Make sure the email type is supported.
+ CategoryInfo          : InvalidArgument: (:) [], ParserException
+ FullyQualifiedErrorId : [Server=BLUPR0501MB1828,RequestId=ea14893a-dd30-4808-aeb5-0e85cbe7eb3b,TimeStamp=6/7/2016 2:21:27 PM] [FailureCategory=Cmdlet-ParserException] 95B6EDE8
+ PSComputerName        : ps.outlook.com

My command line is as such (with edits, of course):

$room | search-mailbox -SearchQuery "kind:calendar AND from:$($user)" -targetmailbox [email protected] -TargetFolder "deleted meetings"

where $user is the UPN of a user, and $room has been extracted from a query.

I've looked and can't seem to determine where the cause of the error is.

Thank you

Upvotes: 1

Views: 1596

Answers (1)

Larry G. Wapnitsky
Larry G. Wapnitsky

Reputation: 1256

Found it. AQS syntax is incorrect. "kind:calendar" should be "kind:meetings"

Upvotes: 1

Related Questions